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;
91 const std::string &username,
92 const std::string &password,
93 const std::string &virtualhost,
94 const std::string &exchange,
95 const std::string &routingKey)
116 void disconnect() throw(rabbitmq_handler_exception);
131 void handleAMQPError(amqp_rpc_reply_t x, std::
string context) throw(rabbitmq_handler_exception);
133 void connect() throw(rabbitmq_handler_exception);
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...
void handleAMQPError(amqp_rpc_reply_t x, std::string context)
Handles errors produced by librabbitmq.
void publish(void *message, const int length)
Publishes the message to the server.
wrapper around librabbitmq, hides error handling and reconnections etc TODO: add reconnection handlin...