This repository has been archived by the owner. It is now read-only.
Code for my lightning talk at pgCon 2011
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

On Rabbits and Elephants


  1. Install RabbitMQ and Management Plugin from:

  2. In the RabbitMQ Management Web UI add:

  3. A direct exchange called "postgres"

  4. A queue called "transactions"

  5. Bind the queue "transactions" to the exchange "postgres" with the routing key "pubish_transactions"

  6. Create two databases:

  7. createdb server

  8. createdb client

  9. Install pg_amqp in to the "server" database. PostgreSQL from:


     easy_install pgxnclient
     pgxnclient install pg_amqp


     psql server < pg_amqp.sql
  10. Import the schemas

     psql server < server.sql
     psql client < client.sql
  11. Install pika, the Python RabbitMQ client library:

     easy_install pika


Kick off all three apps in different terminals:

  1. Kick off ./

  2. Kick off ./

  3. Kick off ./


I included a file here if install the requirements, it will do all of the postgres specific schema setup and the pg_amqp.sql file included in the distro is copied from my contrib install of pg_amqp and your milage may vary.

I used PostgreSQL 9.0.3, RabbitMQ 2.4.1, pika 0.9.6pre0 (github master), psycopg2 2.4.1 and Python 2.6.1