On 01/06/2014 12:35 PM, Steve Huston wrote:
Hi Xiong,

Hi All,

Here is a newbie to QPID.

Welcome!

I am planning to setup a HA cluster with the QPID
as its underlying messaging layer. After going through all Apache QPID online
documenation, I am unable to find the solution to my following
question:

    How can an Exchange on the Passive Node in the cluter knows that it
resides in a passive broker and need to handle incoming messages
differently that when it has been actived as primary node?

The active broker will receive all the messages.
The usual way this is handled is for a virtual IP address to be assigned for 
the cluster's brokers - the address is assigned to the node where the active 
broker is running. Thus, all connections to the virtual IP address go to the 
active broker.

Can we get such information with C++ API classes? I have checked class
Connection, Session and Message. They seem not having such API calls.

The API doesn't know about HA, by design.

That's correct, HA replication and failover are intended to be transparent to the client code.

If you are interested in the gory details of how HA replication, failover etc are implemented, you can take a look at the source code, start from qpid/cpp/src/qpid/ha/README.h

If you're more interested in just using the HA features then I'd start with the qpid book:
 http://qpid.apache.org/releases/qpid-0.24/cpp-broker/book/chapter-ha.html

Good luck, shout if you run into difficulties.

Cheers,
Alan.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to