[
https://issues.apache.org/jira/browse/QPID-4598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Keith Wall resolved QPID-4598.
------------------------------
Resolution: Invalid
This is not a defect. Qpid client's behaviour conforms to the JMS specification.
The JMS Spec (Version 1.1, 3.4.10, JMSPriority) states "When the message is
sent, [JMSPriority] is ignored. After completion of the send, it holds the
value by the method sending the message".
The JEE javadoc states
(http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#setJMSPriority%28int%29)
states "JMS providers set this field when a message is sent"
Message priority must be configured on the MessageProducer. This can by done
with MessageProducer#setPriority(), or set on a message by message basis using
the four arg form of MessageProducer#send().
http://docs.oracle.com/javaee/1.4/api/javax/jms/MessageProducer.html#setPriority%28int%29
http://docs.oracle.com/javaee/1.4/api/javax/jms/MessageProducer.html#send%28javax.jms.Message,%20int,%20int,%20long%29
> AMQP JMS client does not respect JMS Priority when set directly on the message
> ------------------------------------------------------------------------------
>
> Key: QPID-4598
> URL: https://issues.apache.org/jira/browse/QPID-4598
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: 0.20
> Reporter: Christian Posta
> Priority: Minor
>
> The following code won't set the priority correctly:
> {code}
> TextMessage amqpMessage = amqpSession.createTextMessage();
> amqpMessage.setText("hello");
> amqpMessage.setJMSPriority(9);
> p.send(amqpMessage);
> {code}
> because MessageProducerImpl.send(message) uses the following code to pass the
> priority:
> {code}
> public void send(final Message message) throws JMSException
> {
> send(message, getDeliveryMode(), getPriority(), getTimeToLive());
> }
> {code}
> and the call to getPriority() gets the Message producer's priority, not the
> message's priority.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]