[
http://issues.apache.org/jira/browse/QPID-26?page=comments#action_12458505 ]
Martin Ritchie commented on QPID-26:
------------------------------------
Setting the priority for messages on the producers works such as:
producer.setPriority(9);
However this value always overrides any value you may have set on the message
via
message.setJMSPriority(5);
See BasicMessageProducer:sendImpl - line:399
This of course will require broker changes to actually perform the expediting.
> Provide prority parameter implementation for message MessageProducer.send
> method
> --------------------------------------------------------------------------------
>
> Key: QPID-26
> URL: http://issues.apache.org/jira/browse/QPID-26
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker, Java Client
> Reporter: Marnie McCormack
> Fix For: M2
>
>
> The priority parameter on the javax.jmx.MessageProducer.send method is
> exposed in the qpid implementation
> (org.apache.qpid.client.BasicMessageProducer). However, it doesn't actually
> have any impact under the covers i.e. it is currently ignored and has no
> effect. Thus we do not provide any way to expedite messages using the
> priority field.
> This is clearly less than optimal and needs to be addressed. The setting the
> priority flag on the send method should set the JMSPriority field in the
> header. The information below is taken from the JMS specification (see spec
> for refs/more detail):
> The JMSPriority header field contains the message's priority. When a message
> is sent, this field is ignored. After completion of the send, it
> holds the value specified by the method sending the message. JMS defines a
> ten-level priority value, with 0 as the lowest priority and 9 as the
> highest. In addition, clients should consider priorities 0-4 as gradations of
> normal priority and priorities 5-9 as gradations of expedited priority.
> JMS does not require that a provider strictly implement priority ordering of
> messages; however, it should do its best to deliver expedited messages ahead
> of normal messages.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira