activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james.strac...@gmail.com>
Subject Re: Message PRIORITY
Date Tue, 17 Feb 2009 06:43:15 GMT
2009/2/16 Luana87 <l.fioritoni@live.it>:
>
>
>
> James.Strachan wrote:
>>
>> 2009/2/16 Luana87 <l.fioritoni@live.it>:
>>>
>>> Hello,
>>> I'm starting to use ActiveMQ v5.2.0 and I need to prioritize messages
>>> sent
>>> from only one producer.
>>> I am wondering which the correct way is.
>>> In particular I would like to understand which the difference is between
>>> message.setJMSPriority(priority) and sender.setPriority(priority) where
>>> message is a ActiveMQTextMessage and sender is a QueueSender.
>>
>> See this FAQ entry...
>> http://activemq.apache.org/how-can-i-support-priority-queues.html
>>
>>
>> --
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
>> Open Source Integration
>> http://fusesource.com/
>>
>>
>
>
> Thank you for your response.
> Actually I'm able to order message by priority before to put keep they in my
> queue.

Note that ActiveMQ does not order the queue based on the JMS priority header

> I only ask about difference between message.setJMSPriority(priority)  and
> sender.setPriority(priority)  methods and their use with ActiveMQ.

You should use the sender.setPriority. See the javadoc of the
message.setJMSPriority method - it is only intended to be called by
the JMS provider
-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Mime
View raw message