#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.
Public Member Functions | |
virtual void | Publish (const Exchange &exchange, const std::string &routing_key, const std::string &message, MessageType type, engine::Deadline deadline)=0 |
Publish a message to an exchange. | |
virtual void | Publish (const Exchange &exchange, const std::string &routing_key, const std::string &message, engine::Deadline deadline)=0 |
overload of Publish | |
virtual std::string | Get (const Queue &queue, utils::Flags< Queue::Flags > flags, engine::Deadline deadline)=0 |
Gets a single message. | |
|
pure virtual |
Gets a single message.
You should to set kNoAck
flag in order for server to implicitly acknowledge gathered message. By default the gathered message has to be explicitly acknowledged or rejected, however there's no functionality for that yet, so the flag is basically mandatory. This API is a subject to change.
Consumer
instead.queue | name of the queue |
flags | queue flags |
deadline | execution deadline |
Implemented in urabbitmq::Channel, and urabbitmq::Client.
|
pure virtual |
overload of Publish
Implemented in urabbitmq::Channel, and urabbitmq::Client.
|
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
exchange | the exchange to publish to |
routing_key | the routing key |
message | the message to send |
deadline | execution deadline |
fire and forget
(no delivery guarantees), use PublishReliable
for delivery guarantees. Implemented in urabbitmq::Channel, and urabbitmq::Client.