activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y7mn2 <tonyto...@gmail.com>
Subject Re: Future support for message priority in ActiveMQ?
Date Tue, 27 Nov 2007 11:07:45 GMT

Thanks for reply. Currently, I am not quite sure which way to go for
prioritizing the message:
* either using resequencer or 
* using the selector by making the concurrent threads and pool large for
high priority and vice versa.

Is there any other way to do the message prioritizing?

Cheers,

-Tony



James.Strachan wrote:
> 
> On 27/11/2007, y7mn2 <tonytony1@gmail.com> wrote:
>>
>>
>>
>> >
>> > Just pop the resequencer in between the producer and consumer queue;
>> > then you can finely control how the priority ordering works etc. e.g.
>> > you can use complex expressions/rules for sorting things etc. Such as
>> > using JMSPriority first, then by some other header.
>> >
>> > In Camel...
>> >
>> > from("activemq:producerQueue").
>> >   resequencer(header("JMSPriority"), header("MyHeader")).
>> >   to("activemq:consumerQueue");
>> >
>>
>>
>> Hi James,
>>
>> regarding the resequencer above. Does it actually re-sort the message
>> already in cosumerQueue?
> 
> It consumes the messages, sorts then and sends them to another
> destination. So you'd typically use 2 queues - an input queue and an
> output queue.
> 
> 
>> For example: Msg A(priority=2), B(p=6), C(p=8) then those 3 messages will
>> be
>> sort and put it back onto
>> consumerQueue in this order: Msg C, B, A...
>>
>> and if there is another 3 more message comes in like Msg D (p=5), E(8)
>> and
>> F(2), will the consumerQueue resort to: Msg C, E, B, D, A, F? or Msg C,
>> B,
>> A, E, D, F?
> 
> It depends on the configuration; the resequencer works in batches with
> timeouts; so provided the messages arrive within a given time period
> and the batch size is large enough - yes.  You can define how long to
> wait without receiving any more messages - or the maximum batch size.
> 
> e.g. if all those 6 messages arrive within a second; then yes -
> otherwise it'd sort the 2 batches of 3 messages separately.
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Future-support-for-message-priority-in-ActiveMQ--tf3839194s2354.html#a13968864
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message