Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
Listen for updates from the amq.failover exchange. More...
#include <qpid/client/FailoverListener.h>
Public Member Functions | |
FailoverListener (Connection) | |
Subscribe to amq.failover exchange. | |
FailoverListener (Connection, bool useInitial) | |
Subscribe to amq.failover exchange. | |
~FailoverListener () | |
std::vector< Url > | getKnownBrokers () const |
Returns the latest list of known broker URLs. | |
Static Public Member Functions | |
static std::vector< Url > | getKnownBrokers (const Message &m) |
Extract the broker list from a failover exchange message. | |
Static Public Attributes | |
static const std::string | AMQ_FAILOVER |
The name of the standard failover exchange amq.failover. | |
Private Types | |
typedef boost::function0< void > | Functor |
Type to represent a runnable as a Functor. | |
Private Member Functions | |
Functor | functor () |
Create a functor object that will call this->run(). |
Listen for updates from the amq.failover exchange.
In a cluster, the amq.failover exchange provides updates whenever the cluster membership changes. This class subscribes to the failover exchange and providees the latest list of known brokers.
You can also subscribe to amq.failover yourself and use FailoverListener::decode to extract a list of broker URLs from a failover exchange message.
qpid::client::FailoverListener::FailoverListener | ( | Connection | ) |
Subscribe to amq.failover exchange.
qpid::client::FailoverListener::FailoverListener | ( | Connection | , |
bool | useInitial | ||
) |
Subscribe to amq.failover exchange.
useInitial | If true use the connection's initial brokers as the initial value of getKnownBrokers |
qpid::client::FailoverListener::~FailoverListener | ( | ) |
static std::vector<Url> qpid::client::FailoverListener::getKnownBrokers | ( | const Message & | m | ) | [static] |
Extract the broker list from a failover exchange message.
std::vector<Url> qpid::client::FailoverListener::getKnownBrokers | ( | ) | const |
Returns the latest list of known broker URLs.
const std::string qpid::client::FailoverListener::AMQ_FAILOVER [static] |
The name of the standard failover exchange amq.failover.
Definition at line 55 of file FailoverListener.h.