Publisher interface for the broker. This class is merely an interface for convenience and you are not expected to use it directly (use Client
/Channel
instead).
More...
#include <userver/urabbitmq/broker_interface.hpp>
Publisher interface for the broker. This class is merely an interface for convenience and you are not expected to use it directly (use Client
/Channel
instead).
Definition at line 82 of file broker_interface.hpp.
◆ Publish() [1/2]
virtual void urabbitmq::IChannelInterface::Publish |
( |
const Exchange & |
exchange, |
|
|
const std::string & |
routing_key, |
|
|
const std::string & |
message, |
|
|
engine::Deadline |
deadline |
|
) |
| |
|
pure virtual |
◆ Publish() [2/2]
virtual void urabbitmq::IChannelInterface::Publish |
( |
const Exchange & |
exchange, |
|
|
const std::string & |
routing_key, |
|
|
const std::string & |
message, |
|
|
MessageType |
type, |
|
|
engine::Deadline |
deadline |
|
) |
| |
|
pure virtual |
Publish a message to an exchange.
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
-
exchange | the exchange to publish to |
routing_key | the routing key |
message | the message to send |
deadline | execution deadline |
- Note
- This method is
fire and forget
(no delivery guarantees), use PublishReliable
for delivery guarantees.
Implemented in urabbitmq::Channel, and urabbitmq::Client.
The documentation for this class was generated from the following file: