|
| relayer (const scarab::param_node &a_config=scarab::param_node(), const std::string &a_broker_address="", unsigned a_port=0, const std::string &a_auth_file="") |
|
virtual | ~relayer () |
|
void | execute_relayer () |
| Thread execution function: sends any messages that are submitted via the send functions. More...
|
|
wait_for_send_pkg_ptr | send_async (request_ptr_t a_request) const |
|
wait_for_send_pkg_ptr | send_async (alert_ptr_t a_alert) const |
|
reply_ptr_t | wait_for_reply (const wait_for_send_pkg_ptr a_receive_reply, int a_timeout_ms=0) |
|
reply_ptr_t | wait_for_reply (const wait_for_send_pkg_ptr a_receive_reply, bool &a_chan_valid, int a_timeout_ms=0) |
|
| core (const scarab::param_node &a_config=scarab::param_node(), const std::string &a_broker_address="", unsigned a_port=0, const std::string &a_auth_file="", const bool a_make_connection=true) |
|
| core (const bool a_make_connection, const scarab::param_node &a_config=scarab::param_node()) |
|
| core (const core &a_orig) |
|
| core (core &&a_orig) |
|
virtual | ~core () |
|
core & | operator= (const core &a_orig) |
|
core & | operator= (core &&a_orig) |
|
virtual sent_msg_pkg_ptr | send (request_ptr_t a_request) const |
|
virtual sent_msg_pkg_ptr | send (reply_ptr_t a_reply) const |
|
virtual sent_msg_pkg_ptr | send (alert_ptr_t a_alert) const |
|
| snake_case_mv_referrable (std::string, address) |
|
| snake_case_mv_accessible (unsigned, port) |
|
| snake_case_mv_referrable (std::string, username) |
|
| snake_case_mv_referrable (std::string, password) |
|
| snake_case_mv_referrable (std::string, requests_exchange) |
|
| snake_case_mv_referrable (std::string, alerts_exchange) |
|
| snake_case_mv_referrable (std::string, heartbeat_routing_key) |
|
| snake_case_mv_accessible (unsigned, max_payload_size) |
|
| snake_case_mv_accessible (bool, make_connection) |
|
|
static bool | listen_for_message (amqp_envelope_ptr &a_envelope, amqp_channel_ptr a_channel, const std::string &a_consumer_tag, int a_timeout_ms=0, bool a_do_ack=true) |
| return: if false, channel is no longer useable; if true, may be reused More...
|
|
static bool | s_offline = false |
|
sent_msg_pkg_ptr | do_send (message_ptr_t a_message, const std::string &a_exchange, bool a_expect_reply) const |
|
amqp_channel_ptr | send_withreply (message_ptr_t a_message, std::string &a_reply_consumer_tag, const std::string &a_exchange) const |
|
bool | send_noreply (message_ptr_t a_message, const std::string &a_exchange) const |
|
amqp_channel_ptr | open_channel () const |
|
static bool | setup_exchange (amqp_channel_ptr a_channel, const std::string &a_exchange) |
|
static bool | setup_queue (amqp_channel_ptr a_channel, const std::string &a_queue_name) |
|
static bool | bind_key (amqp_channel_ptr a_channel, const std::string &a_exchange, const std::string &a_queue_name, const std::string &a_routing_key) |
|
static std::string | start_consuming (amqp_channel_ptr a_channel, const std::string &a_queue_name) |
|
static bool | stop_consuming (amqp_channel_ptr a_channel, std::string &a_consumer_tag) |
|
static bool | remove_queue (amqp_channel_ptr a_channel, const std::string &a_queue_name) |
|
Asynchronous message sending.
- Author
- N.S. Oblath
This class allows a user to send message asynchronously. Messages are sent in a dedicated thread that runs the function execute_relayer()
. Asynchronous operation is achieved using a concurrent queue to store messages that are submitted.
The primary user interface consists of send_async()
and wait_for_reply
(). The former immediately returns a special sent-message package that includes thread-synchonization objects. That package is then passed to the latter, which blocks while waiting for a reply.
Definition at line 37 of file relayer.hh.