30 #include <amqp_framing.h>
31 #include <netinet/in.h>
33 namespace drizzle_plugin {
47 virtual const char* what()
const throw()
61 amqp_connection_state_t rabbitmqConnection;
63 const std::string &hostname;
66 const std::string &username;
67 const std::string &password;
68 const std::string &virtualhost;
69 const std::string &exchange;
70 const std::string &routingKey;
71 pthread_mutex_t publishLock;
73 bool rabbitmq_connection_established;
92 const std::string &username,
93 const std::string &password,
94 const std::string &virtualhost,
95 const std::string &exchange,
96 const std::string &routingKey)
117 void disconnect() throw(rabbitmq_handler_exception);
118 void connect() throw(rabbitmq_handler_exception);
133 void handleAMQPError(amqp_rpc_reply_t x, std::
string context) throw(rabbitmq_handler_exception);
void handleAMQPError(amqp_rpc_reply_t x, std::string context)
Handles errors produced by librabbitmq.
RabbitMQHandler(const std::string &hostname, const in_port_t port, const std::string &username, const std::string &password, const std::string &virtualhost, const std::string &exchange, const std::string &routingKey)
Constructs a new RabbitMQHandler, purpose is to hide away the error handling, reconnections etc...
wrapper around librabbitmq, hides error handling and reconnections etc TODO: add reconnection handlin...
void publish(void *message, const int length)
Publishes the message to the server.