activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffwonder <>
Subject change queue strategy?
Date Thu, 02 Nov 2006 02:17:26 GMT

Is there a way to overwrite queue's FIFO strategy behavior? Basically I am
looking for a DispatchPolicy like plugin for queue strategy plugin.

What I like to do is create a list of queues such way that each worker
(consumers) will round robin the queue list and consume a message from a
queue. For instances, I can have

Queue 1 ->msg_1, msg_2, msg_3
Queue 2 ->msg_a, msg_b

The consumers should consume the messages in the following order:
msg_1, msg_a, msg_2, msg_b, msg_3

If the number of queues in the list is fix, then the problem can be easily
solved using priority queue and/or pre-create a fix list of queues. The
problem is that at any given time, a new queue can be added into the list
such way that

if Queue 3 is added after msg_a is consumed, 

Queue 3 ->msg_o

then the above output should really be:

msg_1, msg_a, msg_o, msg_2,  msg_b, msg_3
msg_1, msg_a, msg_2, msg_b, msg_o, msg_3

both are valid due to timing issue. 

Is there a way to configure above behavior? If not, how hard is to refactor
current activemq code in order to allow pluggable queue strategies?

Thanks -jeff


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message