Marcus Eriksson: Replicating transactions directly to RabbitMQ

Previously RabbitReplication tailed the transaction log provided by Drizzle and then the Java application sent the protobuf serialized transaction to RabbitMQ. Now it is possible to skip the transaction log file and send the transaction directly to the RabbitMQ server without the extra step of storing it in a file first.

The code is available at https://code.launchpad.net/~krummas/drizzle/rabbitmq_log and to build it with rabbitmq support you need to install librabbitmq which is a bit tricky;

Installing librabbitmq

  1. Install mercurial
  2. Branch the librabbitmq code: hg clone http://hg.rabbitmq.com/rabbitmq-c/ 
  3. Branch the rab! bitmq codegen repo into a subdirectory called codegen in the rabbitmq-c directory:
    1. cd rabbitmq-c
    2. hg clone http://hg.rabbitmq.com/rabbitmq-codegen/ codegen
  4. Run autoconf like this: autoreconf -i 
  5. Run the configure script
  6. make
  7. make install
Build Drizzle
When librabbitmq is installed, build drizzle like this:

  1. bzr branch lp:~krummas/drizzle/rabbitmq-log
  2. config/autorun.sh
  3. ./configure --with-rabbitmq-log-plugin
  4. make
  5. make install
and it is done! 

Start Drizzle with RabbitMQ support
First, you can run drizzled with a --help flag to see the options available, they are all prefixed with --rabbitmq-log-XYZ. 

The default values for ! the parameters makes drizzle connect to localhost as "guest" and repli cate to an exchange called ReplicationExchange. Start it like this to replicate changes to a rabbitmq on localhost:
$ sbin/drizzled --default-replicator-enable --rabbitmq-log-enable

The other available options are described in --help

URL: http://developian.blogspot.com/2010/01/replicating-transactions-directly-to.html

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to