A TransactionApplier that sends the transactions to rabbitmq (or any AMQP 0-8 compliant message queue) More...
#include <rabbitmq_log.h>
Public Types | |
|
typedef std::pair< const std::string, const std::string > | map_key |
|
typedef std::map< const map_key, plugin::Plugin * > | map |
| typedef std::vector< Plugin * > | vector |
Public Member Functions | |
| RabbitMQLog (const std::string &name, RabbitMQHandler *mqHandler) | |
| Constructs a new RabbitMQLog. | |
| drizzled::plugin::ReplicationReturnCode | apply (drizzled::Session &session, const drizzled::message::Transaction &to_apply) |
| Serializes the transaction and uses a RabbiMQHandler to publish the message. | |
| virtual void | shutdownPlugin () |
| virtual void | prime () |
| virtual void | startup (drizzled::Session &) |
| void | activate () |
| void | deactivate () |
| bool | isActive () const |
| const std::string & | getName () const |
| void | setModule (module::Module *module) |
| const std::string & | getTypeName () const |
| virtual bool | removeLast () const |
| const std::string & | getModuleName () const |
Static Public Member Functions | |
| static bool | addPlugin (TransactionApplier *applier) |
| static void | removePlugin (TransactionApplier *applier) |
Private Attributes | |
| RabbitMQHandler * | _rabbitMQHandler |
| const std::string | _exchange |
| const std::string | _routingkey |
A TransactionApplier that sends the transactions to rabbitmq (or any AMQP 0-8 compliant message queue)
Connects to rabbitmq server in constructor, publishes messages in apply(...). If error occurs, the plugin disables itself.
Definition at line 45 of file rabbitmq_log.h.
| drizzle_plugin::RabbitMQLog::RabbitMQLog | ( | const std::string & | name, |
| RabbitMQHandler * | mqHandler | ||
| ) |
Constructs a new RabbitMQLog.
Takes an instance of RabbitMHandler and uses that for rabbitmq communication
| [in] | mqHandler | name of the plugin, typically rabbitmq_log. |
Definition at line 52 of file rabbitmq_log.cc.
|
virtual |
Serializes the transaction and uses a RabbiMQHandler to publish the message.
Serializes the protobuf transaction and drops it on rabbitmq
| [in] | to_apply | the transaction to send |
Implements drizzled::plugin::TransactionApplier.
Definition at line 65 of file rabbitmq_log.cc.
References drizzle_plugin::RabbitMQHandler::publish().