A RabbitMQ VHost Implementation of the rmqp::Connection interface.
More...
#include <rmqa_vhostimpl.h>
|
|
| VHostImpl (const ConnectionMaker &connectionMaker) |
| |
| rmqt::Result< rmqp::Producer > | createProducer (const rmqt::Topology &topology, rmqt::ExchangeHandle exchange, uint16_t maxOutstandingConfirms) BSLS_KEYWORD_OVERRIDE |
| |
| rmqt::Result< rmqp::Consumer > | createConsumer (const rmqt::Topology &topology, rmqt::QueueHandle queue, const rmqp::Consumer::ConsumerFunc &onMessage, const rmqt::ConsumerConfig &config) BSLS_KEYWORD_OVERRIDE |
| | Create an asynchronous consumer using the provided Topology. More...
|
| |
| rmqt::Future< rmqp::Producer > | createProducerAsync (const rmqt::Topology &topology, rmqt::ExchangeHandle exchange, uint16_t maxOutstandingConfirms) BSLS_KEYWORD_OVERRIDE |
| |
| rmqt::Future< rmqp::Consumer > | createConsumerAsync (const rmqt::Topology &topology, rmqt::QueueHandle queue, const rmqp::Consumer::ConsumerFunc &onMessage, const rmqt::ConsumerConfig &config) BSLS_KEYWORD_OVERRIDE |
| |
| void | close () BSLS_KEYWORD_OVERRIDE |
| | Flush all data pending and then close the connection. Close the connection and invalidates all consumers and producers created through this connection. More...
|
| |
| virtual rmqt::Result< rmqp::Consumer > | createConsumer (const rmqt::Topology &topology, rmqt::QueueHandle queue, const rmqp::Consumer::ConsumerFunc &messageConsumer, const bsl::string &consumerTag, uint16_t prefetchCount) |
| |
|
virtual rmqt::Future< rmqp::Consumer > | createConsumerAsync (const rmqt::Topology &topology, rmqt::QueueHandle queue, const rmqp::Consumer::ConsumerFunc &messageConsumer, const bsl::string &consumerTag, uint16_t prefetchCount) |
| |
A RabbitMQ VHost Implementation of the rmqp::Connection interface.
◆ close()
| void BloombergLP::rmqa::VHostImpl::close |
( |
| ) |
|
|
virtual |
Flush all data pending and then close the connection. Close the connection and invalidates all consumers and producers created through this connection.
Implements BloombergLP::rmqp::Connection.
◆ createConsumer() [1/2]
Create an asynchronous consumer using the topology provided. This method also creates the topology on the target broker synchronously using the timeout provided. If the timeout expires, the converted bool value of Result object returned by this function will be false. The value of the result Result::value() will be still usable in this case though. User-defined callbacks are run on the thread-pool, as messages are received from the broker.
◆ createConsumer() [2/2]
Create an asynchronous consumer using the provided Topology.
- Parameters
-
| topology | The RabbitMQ topology which will be declared on the broker with this consumer. |
| queue | The queue to consume from. This queue must be contained within topology. |
| onMessage | The callback to be invoked on each message. This will be invoked from the RabbitContext threadpool. |
| consumerConfig | dictates any optional tunables for the consumer, e.g. consumerTag, prefetchCount, threadpool to process the messages on |
- Returns
- A result which will contain either the connected consumer object which has been registered on the Event Loop thread or an error.
Implements BloombergLP::rmqp::Connection.
◆ createConsumerAsync()
◆ createProducer()
Create a producer for the given exchange using the topology provided. This method starts the process of declaring the topology, and creating the producer. The returned Future provides access to the Producer when it is ready.
- Parameters
-
| topology | The topology declared by this producer. This topology will be re-declared on reconnection. The passed exchange must exist in the given topology |
| exchange | The exchange to which all produced messages will be published |
| maxOutstandingConfirms | The maximum number of confirms the Producer will allow before blocking, and waiting for a confirm from the broker |
Implements BloombergLP::rmqp::Connection.
◆ createProducerAsync()
The documentation for this class was generated from the following files: