New JMS Provider endpoint should allow per message setting of JMSPriority or 
JMSTimeToLive
------------------------------------------------------------------------------------------

                 Key: SMXCOMP-702
                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-702
             Project: ServiceMix Components
          Issue Type: Improvement
          Components: servicemix-jms
            Reporter: Joe Luo
         Attachments: smx-jms-patch.patch

The new JMS provider endpoint does not allow per message setting of QoS 
properties such as priority and timeToLive. 

When sending a message to destination, the JmsProviderEndpoint invokes 
"send(Destination dest, MessageCreator message)" on Spring JmsTemplate:
{code}
        template.send(dest, new MessageCreator() {
            public Message createMessage(Session session) throws JMSException {
                return message;
            }
        });
{code}
Then, the Spring JmsTemplate calls doSend() function:
{code}
        protected void doSend(MessageProducer producer, Message message) throws 
JMSException {
                if (isExplicitQosEnabled()) {
                        producer.send(message, getDeliveryMode(), 
getPriority(), getTimeToLive());
                }
                else {
                        producer.send(message);
                }
        }
{code}
Basically, the Spring JMSTemplate will override "JMSDeliveryMode", 
"JMSPriority" and "JMSExpiration" properties that specified on the message.

We should allow per message setting of QoS properties such as priority and 
timeToLive by the new Jms provider endpoint.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to