Nevermind. prefetch=1 does the trick.

-jeff


jeffwonder wrote:
> 
> Hi,
>   I am using ActiveMQ v4.0.1, with one producer and multiple consumers. I
> have notice that distributed queue isn't working very well when a consumer
> is restarted in such way that:
> - producer sends 1000 messages into the queue and complete
> - all consumers (A,B,C) are processing the messages from the queue (all
> three are getting messages in round robin fashion)
> - I manually kill consumer A and restart A
> - Now, A is always idle while consumer B and C continue to process the
> remaining messages in the queue
> - Now, if I manully kill all consumers (A, B, and C), then start them in
> sequence (A, B, and C)
> - only A is processing the remaining messages, B and C are idling.
> 
> It seems to me that whenever a new consumer joins into the distributed
> queue, it can not process any existing messages in the queue. Now, if the
> producer sends more messages into the queue, consumer B and C will *ONLY*
> get the newly sent messages but not the existing ones in the queue (only A
> can get it).
> 
> Given above behavior, it is hard to use distributed queue in a clustered
> environment as any node in the cluster can fail and restart at any given
> time while there are many messages in the queue.
> 
> Thanks -jeff
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Distributed-queue%3A-restarted-consumer-can%27t-get-messages-in-the-queue--tf2549772.html#a7106788
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to