|
drizzle
C++ MySQL-protocol-compatible database server
|
A TransactionApplier that sends the transactions to rabbitmq (or any AMQP 0-8 compliant message queue). More...
#include <rabbitmq_log.h>
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. | |
| void | setRabbitMQHandler (RabbitMQHandler *new_rabbitMQHandler) |
| Public Member Functions inherited from drizzled::plugin::TransactionApplier | |
| TransactionApplier (std::string name_arg) | |
| virtual ReplicationReturnCode | apply (Session &in_session, const message::Transaction &to_apply)=0 |
| Public Member Functions inherited from drizzled::plugin::Plugin | |
| Plugin (const std::string &name, const std::string &type_name) | |
| 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 |
Private Attributes | |
| RabbitMQHandler * | _rabbitMQHandler |
| const std::string | _exchange |
| const std::string | _routingkey |
Additional Inherited Members | |
| Public Types inherited from drizzled::plugin::Plugin | |
| typedef std::pair< const std::string, const std::string > | map_key |
| typedef std::unique_ptr< plugin::Plugin, deleter_fn > | owned_ptr |
| typedef std::map< const map_key, owned_ptr > | map |
| typedef std::vector< Plugin * > | vector |
| Static Public Member Functions inherited from drizzled::plugin::TransactionApplier | |
| static bool | addPlugin (TransactionApplier &applier) |
| static void | removePlugin (TransactionApplier &applier) |
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::rabbitmq::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 67 of file rabbitmq_log.cc.
| drizzle_plugin::rabbitmq::RabbitMQLog::~RabbitMQLog | ( | ) |
Definition at line 73 of file rabbitmq_log.cc.
| plugin::ReplicationReturnCode drizzle_plugin::rabbitmq::RabbitMQLog::apply | ( | drizzled::Session & | session, |
| const drizzled::message::Transaction & | to_apply ) |
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 |
Definition at line 80 of file rabbitmq_log.cc.
| void drizzle_plugin::rabbitmq::RabbitMQLog::setRabbitMQHandler | ( | RabbitMQHandler * | new_rabbitMQHandler | ) |
Definition at line 123 of file rabbitmq_log.cc.
|
private |
Definition at line 50 of file rabbitmq_log.h.
|
private |
Definition at line 49 of file rabbitmq_log.h.
|
private |
Definition at line 51 of file rabbitmq_log.h.