userver: urabbitmq::ReliableChannel Class Reference
Loading...
Searching...
No Matches
urabbitmq::ReliableChannel Class Referencefinal

Reliable publisher interface for the broker. You may use this class to reliably publish your messages (publisher-confirms). More...

#include <userver/urabbitmq/channel.hpp>

+ Inheritance diagram for urabbitmq::ReliableChannel:
+ Collaboration diagram for urabbitmq::ReliableChannel:

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
 

Detailed Description

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 59 of file channel.hpp.

Member Function Documentation

◆ PublishReliable() [1/2]

void urabbitmq::ReliableChannel::PublishReliable ( const Exchange exchange,
const std::string &  routing_key,
const std::string &  message,
engine::Deadline  deadline 
)
inlineoverridevirtual

overload of PublishReliable

Implements urabbitmq::IReliableChannelInterface.

Definition at line 70 of file channel.hpp.

◆ PublishReliable() [2/2]

void urabbitmq::ReliableChannel::PublishReliable ( const Exchange exchange,
const std::string &  routing_key,
const std::string &  message,
MessageType  type,
engine::Deadline  deadline 
)
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

Parameters
exchangethe exchange to publish to
routing_keythe routing key
messagethe message to send
deadlineexecution deadline

Implements urabbitmq::IReliableChannelInterface.


The documentation for this class was generated from the following file: