activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Balanced reading from queue group
Date Mon, 21 Aug 2006 06:55:13 GMT
Can you use parallelisation? In which case just create one consumer
(in its own session) for each queue then you'l process things
concurrently. Otherwise you might want to create a JMS client with a
collection of consumers where you do a receive(timeout) on each queue
in order to ensure fair consumption.

On 8/21/06, Eugene Prokopiev <> wrote:
> Hi,
> Suppose I have this queues:
> queue://mesages.input-0
> queue://mesages.input-1
> queue://mesages.input-2
> ...
> queue://mesages.input-n
> I need to read messages from every queue and process them in the same
> way. Processing will consume significant time (1s or more). Message
> incoming distribution is 1 message per 1 minute in every queue, but
> sometimes in one queue can apper about 1000 messages in short time
> period. The main demand to processing application is not delay
> processing of other queues and process big amount of messages in rest
> time. So, any round robin reading algorithm must be used in this case.
> Is it possible to do it automatically with one consumer (or pool of
> consumers) which will be read from queue://mesages.> or need I create
> separate consumer for each queue to implement this behavior?
> --
> Thanks,
> Eugene Prokopiev



View raw message