activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DCMH <>
Subject Re: Getting Durable Messages After Failover
Date Fri, 03 Jul 2009 03:48:46 GMT

Thanks for answering.

But my problem is that the 2 brokers are up and running, 

scenario as below:

                   A                    B                 C                          
broker 1   ----+--------                                      -------------

broker 2                                           ----+------

Client connects to broker 1 and consume message A and disconnected before
unsubscription, message B is published before the client reconnects. Later
the client reconnect to broker 2 using the failover protocol. However, it
was unable to resume the session established in broker 1 so it cannot
consume message B as it was delivered to broker 1. While the client is
connecting to broker 2, message C is published and the client is able to
consume message C. However, it seems that the session established in broker
1 is still valid and broker 1 still get message C.

Later, the client get disconnected again and reconnects to broker 1 using
the failover protocol, it gets message B and C from broker 1.

There are 2 potential problems:
1) the client will not be able to get message B if it keeps connecting to
broker 2 after the first reconnection.
2) the client gets a duplication of message C when it connects to broker 1
after the second reconnection.

I have no idea on how to make use of the Replicated Message Stores in this
case since both broker 1 and broker 2 are up and running at the same time
(working in a cluster, instead of Master-Slave). 

Would you mind to explain in more details?

Much appreciated for your help.

You need to replicate the messages between the two brokers.
See and look for "Master Slave"
or "Replicated Message Stores"

Open Source Integration

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

View raw message