17#ifndef INCLUDED_RMQA_VHOST
18#define INCLUDED_RMQA_VHOST
20#include <rmqa_topology.h>
21#include <rmqp_connection.h>
22#include <rmqp_consumer.h>
23#include <rmqp_topology.h>
24#include <rmqt_consumerconfig.h>
25#include <rmqt_credentials.h>
26#include <rmqt_endpoint.h>
27#include <rmqt_future.h>
28#include <rmqt_properties.h>
29#include <rmqt_queue.h>
30#include <rmqt_result.h>
32#include <bdlmt_threadpool.h>
34#include <bslma_managedptr.h>
35#include <bsls_timeinterval.h>
37#include <bsl_memory.h>
38#include <bsl_string.h>
40namespace BloombergLP {
57 explicit VHost(bslma::ManagedPtr<rmqp::Connection> impl);
81 rmqt::ExchangeHandle exchange,
82 uint16_t maxOutstandingConfirms);
101 rmqt::QueueHandle queue,
127 rmqt::QueueHandle queue,
129 const bsl::string& consumerTag,
130 uint16_t prefetchCount = rmqt::ConsumerConfig::s_defaultPrefetchCount);
139#ifdef USES_LIBRMQ_EXPERIMENTAL_FEATURES
161 deleteQueue(
const bsl::string& name,
162 rmqt::QueueUnused::Value ifUnused,
163 rmqt::QueueEmpty::Value ifEmpty,
164 const bsls::TimeInterval& timeout = bsls::TimeInterval(0));
169 rmqt::ExchangeHandle exchange,
170 uint16_t maxOutstandingConfirms);
174 rmqt::QueueHandle queue,
181 rmqt::QueueHandle queue,
183 const bsl::string& consumerTag,
184 uint16_t prefetchCount = rmqt::ConsumerConfig::s_defaultPrefetchCount);
189 VHost& operator=(
const VHost&) BSLS_KEYWORD_DELETED;
192 bslma::ManagedPtr<rmqp::Connection> d_impl;
A RabbitMQ VHost object.
Definition: rmqa_vhost.h:52
rmqt::Result< Consumer > createConsumer(const rmqp::Topology &topology, rmqt::QueueHandle queue, const rmqp::Consumer::ConsumerFunc &onMessage, const rmqt::ConsumerConfig &config=rmqt::ConsumerConfig())
Create an asynchronous consumer using the provided Topology.
Definition: rmqa_vhost.cpp:64
void close()
Close the connection to the broker. The connection will not reconnect after this call.
Definition: rmqa_vhost.cpp:46
rmqt::Result< Producer > createProducer(const rmqp::Topology &topology, rmqt::ExchangeHandle exchange, uint16_t maxOutstandingConfirms)
Create a producer using the provided Topology. This method starts the process of declaring the topolo...
Definition: rmqa_vhost.cpp:53
static bsl::string generateConsumerTag()
Definition: rmqa_vhost.cpp:48
VHost(bslma::ManagedPtr< rmqp::Connection > impl)
Definition: rmqa_vhost.cpp:41
virtual ~VHost()
The RabbitMQ connection will be disconnected on this call.
Definition: rmqa_vhost.cpp:35
bsl::function< void(rmqp::MessageGuard &)> ConsumerFunc
Callback function used to receive messages.
Definition: rmqp_consumer.h:48
An interface providing a manipulatable RabbitMQ topology structure.
Definition: rmqp_topology.h:39
Class for passing arguments to Consumer.
Definition: rmqt_consumerconfig.h:42
An async-style Future/Promise object.
Definition: rmqt_future.h:108
A result of an operation.
Definition: rmqt_result.h:37