#include <userver/urabbitmq/channel.hpp>
Reliable publisher interface for the broker. You may use this class to reliably publish your messages (publisher-confirms).
You may as well use Client
itself instead, this class gives no additional benefits and is present merely for convenience.
You are not expected to store this class for a long time, because it takes a connection from the underlying connections pool.
Usually retrieved from Client
.
Definition at line 69 of file channel.hpp.
Public Member Functions | |
ReliableChannel (ConnectionPtr &&channel) | |
ReliableChannel (ReliableChannel &&other) noexcept | |
void | PublishReliable (const Exchange &exchange, const std::string &routing_key, const std::string &message, MessageType type, engine::Deadline deadline) override |
Publish a message to an exchange and await confirmation from the broker. | |
void | PublishReliable (const Exchange &exchange, const std::string &routing_key, const std::string &message, engine::Deadline deadline) override |
overload of PublishReliable | |
|
inlineoverridevirtual |
overload of PublishReliable
Implements urabbitmq::IReliableChannelInterface.
Definition at line 84 of file channel.hpp.
|
overridevirtual |
Publish a message to an exchange and await confirmation from the broker.
You have to supply the name of the exchange and a routing key. RabbitMQ will then try to send the message to one or more queues. By default unroutable messages are silently discarded
exchange | the exchange to publish to |
routing_key | the routing key |
message | the message to send |
deadline | execution deadline |
Implements urabbitmq::IReliableChannelInterface.