|
RMQ - RabbitMQ C++ Library
|
This class provides a manipulatable RabbitMQ topology structure. More...
#include <rmqa_topology.h>


Public Member Functions | |
| rmqt::QueueHandle | addQueue (const bsl::string &name=bsl::string(), rmqt::AutoDelete::Value=rmqt::AutoDelete::OFF, rmqt::Durable::Value=rmqt::Durable::ON, const rmqt::FieldTable &args=rmqt::FieldTable()) BSLS_KEYWORD_OVERRIDE |
| Declare a queue. More... | |
| rmqt::ExchangeHandle | addExchange (const bsl::string &name, const rmqt::ExchangeType &exchangeType=rmqt::ExchangeType::DIRECT, rmqt::AutoDelete::Value=rmqt::AutoDelete::OFF, rmqt::Durable::Value=rmqt::Durable::ON, rmqt::Internal::Value=rmqt::Internal::NO, const rmqt::FieldTable &args=rmqt::FieldTable()) BSLS_KEYWORD_OVERRIDE |
| Declare an exchange. More... | |
| rmqt::ExchangeHandle | addPassiveExchange (const bsl::string &name) BSLS_KEYWORD_OVERRIDE |
| Declare a dependency on an existing Exchange. If the exchange isn't already declared on the server, it will return an error and the library will fail to connect. More... | |
| rmqt::QueueHandle | addPassiveQueue (const bsl::string &name) BSLS_KEYWORD_OVERRIDE |
| Declare a dependency on an existing Queue. If the queue isn't already declared on the server, it will return an error and the library will fail to connect. More... | |
| void | bind (const rmqt::ExchangeHandle &exchangeName, const rmqt::QueueHandle &queue, const bsl::string &bindingKey, const rmqt::FieldTable &args=rmqt::FieldTable()) BSLS_KEYWORD_OVERRIDE |
| Bind a queue and an exchange. More... | |
| void | bind (const rmqt::ExchangeHandle &sourceExchange, const rmqt::ExchangeHandle &destinationExchange, const bsl::string &bindingKey, const rmqt::FieldTable &args=rmqt::FieldTable()) BSLS_KEYWORD_OVERRIDE |
| Bind two exchanges. More... | |
| const rmqt::Topology & | topology () const BSLS_KEYWORD_OVERRIDE |
| Get a readonly copy of stored topology. More... | |
| const rmqt::ExchangeHandle | defaultExchange () BSLS_KEYWORD_OVERRIDE |
| Retrieve a handle for the default exchange. More... | |
Friends | |
| bsl::ostream & | operator<< (bsl::ostream &os, const Topology &topology) |
This class provides a manipulatable RabbitMQ topology structure.
Represents the RabbitMQ topology, allowing declaring of Exchanges, Queues, and Bindings. This object is passed to rmqa::VHost when creating Producers and Consumers, which ensure this topology is available on the broker.
|
virtual |
Reimplemented from BloombergLP::rmqp::Topology.
|
virtual |
Declare an exchange.
| name | Exchange name. Maximum allowed length is 127 characters. See https://www.rabbitmq.com/amqp-0-9-1-reference.html#exchange.declare.exchange for name rules. |
| exchangeType | The exchange type drives the meaning of the routingKey when publishing to an exchange. |
| autoDelete | When ON the exchange is deleted after all bindings are removed. |
| durable | When ON the exchange declaration will survive broker restarts |
| internal | When YES the exchange is declared as an internal. Internal exchange cannot be used directly by publishers. It can be used, when bound to other exchange. |
| args | Further Exchange properties are controlled by key-value properties defined in an rmqt::FieldTable. |
Implements BloombergLP::rmqp::Topology.
|
virtual |
Declare a dependency on an existing Exchange. If the exchange isn't already declared on the server, it will return an error and the library will fail to connect.
| name | Exchange name. |
Implements BloombergLP::rmqp::Topology.
|
virtual |
Declare a dependency on an existing Queue. If the queue isn't already declared on the server, it will return an error and the library will fail to connect.
| name | Queue name. |
Implements BloombergLP::rmqp::Topology.
|
virtual |
Declare a queue.
| name | Queue Name. See https://www.rabbitmq.com/queues.html#names for name rules. |
| autoDelete | Not recommended When ON the queue is declared as autodelete. An autodelete queue is deleted when it's last consumer is cancelled. This could cause data loss if all consumers are disconnected in an outage. |
| durable | When ON the queue declaration will survive broker restarts. Persistent messages will also survive broker restart in the queue. Message persistence is controlled by the publisher. |
| args | Other queue properties (such as TTL) are controlled by key-value properties held in a rmqt::FieldTable. |
Implements BloombergLP::rmqp::Topology.
|
virtual |
Bind a queue and an exchange.
Implements BloombergLP::rmqp::Topology.
|
virtual |
Bind two exchanges.
Implements BloombergLP::rmqp::Topology.
|
virtual |
Retrieve a handle for the default exchange.
The default exchange is an exchange named '' (length 0). It is a DIRECT exchange with automatic bindings for all queues within the vhost
Implements BloombergLP::rmqp::Topology.
|
virtual |
Get a readonly copy of stored topology.
This is used internally by rmqamqp to send the topology to the broker
Implements BloombergLP::rmqp::Topology.