activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kalki70 <>
Subject Re: Automatic recovery when using Message Groups
Date Thu, 12 Feb 2009 17:12:58 GMT

Hi, Dejan,

I agree consumers don't know which groups they will be assigned. As you
said, if a consumer goes down, other will take those groups, but the problem
comes when the consumer that went down comes back again. It will never
receive any more messages. So what I proposed was something like the
consumer saying : 
"Hey, I crashed, but I came back. Give me back the message groups I had
before. By the way, last time I subscribed my consumer id was xxxxx".

The feature you mention, that when a new consumer subscribes, the broker
tries to distribute evenly the messages groups, is just like having now my
Christmas gift :jumping:. It would be really wonderful :clap:, because it
solves the problem of adding more consumers dynamically.  

The policy using consumersBeforeDispatchStarts and timeBeforeDispatchStarts
seemed to me just a temporary solution to the problem, but this one looks
much more powerful. Not only consumers that go down can come back and
process messages, also more consumers can be added at any time. 

Best regards,


Dejan Bosanac wrote:
> Hi Luis,
> I'm not sure this is the correct use case. Consumers don't explicitly know
> what groups they will be assigned to when they first subscribe, so there
> is
> usually no difference what consumer is consuming messages from what group.
> When your consumer goes down, the other one will take its group and
> everything will work fine.
> Maybe we should add a feature that would instruct the broker to try to
> make
> an even distribution of groups among consumers. So when the new consumer
> is
> subscribed, the broker will see if it can reassign certain groups to it
> depending on the number of groups assigned to existing consumers. I have
> an
> impression, that this would make for you as well?
> Cheers
> --
> Dejan Bosanac
> Open Source Integration -
> ActiveMQ in Action -
> Blog -

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

View raw message