Drizzled Public API Documentation

drizzle_plugin::RabbitMQLog Class Reference

A TransactionApplier that sends the transactions to rabbitmq (or any AMQP 0-8 compliant message queue) More...

#include <rabbitmq_log.h>

Inheritance diagram for drizzle_plugin::RabbitMQLog:
drizzled::plugin::TransactionApplier drizzled::plugin::Plugin

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

Detailed Description

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.

Constructor & Destructor Documentation

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

Parameters
[in]mqHandlername of the plugin, typically rabbitmq_log.

Definition at line 52 of file rabbitmq_log.cc.

Member Function Documentation

plugin::ReplicationReturnCode drizzle_plugin::RabbitMQLog::apply ( drizzled::Session session,
const drizzled::message::Transaction to_apply 
)
virtual

Serializes the transaction and uses a RabbiMQHandler to publish the message.

Serializes the protobuf transaction and drops it on rabbitmq

Parameters
[in]to_applythe transaction to send

Implements drizzled::plugin::TransactionApplier.

Definition at line 65 of file rabbitmq_log.cc.

References drizzle_plugin::RabbitMQHandler::publish().


The documentation for this class was generated from the following files: