Owns resources shared between multiple RabbitMQ connections.
More...
#include <rmqa_rabbitcontext.h>
Owns resources shared between multiple RabbitMQ connections.
rmqa::RabbitContext Owns the threadpool & async event loop which is shared between connections. rmqa::RabbitContext must live longer than all connections created from it.
◆ RabbitContext() [1/2]
◆ RabbitContext() [2/2]
| BloombergLP::rmqa::RabbitContext::RabbitContext |
( |
bslma::ManagedPtr< rmqp::RabbitContext > |
impl | ) |
|
|
explicit |
Construct a RabbitContext with a different implementation This is primarily used by mock objects for unit tests.
- Parameters
-
◆ ~RabbitContext()
| BloombergLP::rmqa::RabbitContext::~RabbitContext |
( |
| ) |
|
Trigger the destruction of the event loop, and (if not passed in) the threadpool. The destructor will block waiting for the eventloop and threadpool threads to join(). rmqa::VHost handles should be destructed before the RabbitContext to avoid waiting indefinitely.
◆ createVHostConnection() [1/2]
| bsl::shared_ptr< rmqa::VHost > BloombergLP::rmqa::RabbitContext::createVHostConnection |
( |
const bsl::string & |
userDefinedName, |
|
|
const bsl::shared_ptr< rmqt::Endpoint > & |
endpoint, |
|
|
const bsl::shared_ptr< rmqt::Credentials > & |
credentials |
|
) |
| |
Connect to a RabbitMQ broker.
- Parameters
-
| endpoint | identifies the broker to connect to |
| credentials | Authentication information |
Create a new rmqa::VHost to a RabbitMQ broker. Connections will be established (with the broker) when creating producers or consumers on the vhost object
◆ createVHostConnection() [2/2]
| bsl::shared_ptr< rmqa::VHost > BloombergLP::rmqa::RabbitContext::createVHostConnection |
( |
const bsl::string & |
userDefinedName, |
|
|
const rmqt::VHostInfo & |
vhostInfo |
|
) |
| |
Connect to a RabbitMQ broker.
- Parameters
-
| vhostInfo | identifies the broker to connect to & authentication details |
Create a new rmqa::VHost to a RabbitMQ broker. Connections will be established (with the broker) when creating producers or consumers on the vhost object
The documentation for this class was generated from the following files: