On Wed, Feb 24, 2010 at 2:31 PM, Josh Carlson <jcarl...@e-dialog.com> wrote:
> Hi Gary,
>
> Thanks for the explanation. The order is:
>
>    consumer retrieves message
>
>    connection is lost and consumer re-establishes connection to new master
> broker
>
>    consumer acks the message retrieved from the former broker
>
>    consumer retrieves the same message it just ack'ed.
>
> I guess the question is ... is there a way for the new broker on failover to
> recognize the consumers that have retrieved message but not ack'ed messages
> and behave exactly as if they were retrieved from itself (not redispatch
> unless the connection to the consumer is lost)? I suppose that would require
> some heuristics to determine how long to wait before those original
> consumers reconnect.

Given the sequence that you listed above, the redispatch of the
messages is correct as Gary explained. Given the loss of the
connection, the broker will redispatch any pending messages. Any
messages that the client received from the lost connection that are
unacked cannot be acked using the new connection (i.e., the client
can't just hold those messages and swap the underlying connection).

Bruce
-- 
perl -e 'print 
unpack("u30","D0G)u8...@4vyy9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Reply via email to