Examples and source code from the book RabbitMQ in Action.
Python C# PHP Java Erlang Ruby
Latest commit 27cb99b Jul 3, 2012 @videlalvaro videlalvaro Merge pull request #4 from SleepTillSeven/master
modifying example code
Failed to load latest commit information.
configs Fixed Shovel config to work with 2.7.0. Apr 4, 2012
csharp/appendix-a Made line lengths shorter. Nov 23, 2011
erlang/chapter-12/rabbitmq-recent-history-exchange updates package file to add plugin version number Nov 29, 2011
java/appendix-a Java RPC code Nov 9, 2011
php new PHP scrip for ch3 Dec 1, 2011
python Fixed comment. Nov 19, 2011
ruby modifying code so it's similar to the python example Jul 3, 2012
.gitignore
LICENSE.md adds distribution note Jun 1, 2011
README.md Updated RMQ versions. Oct 31, 2011
pika-0.9.6.tar.bz2 Added Pika 0.9.6pre0 tarball. Oct 31, 2011

README.md

RabbitMQ in Action Examples

Requirements

Python Examples

  • Python 2.6 or newer
  • Pika

PHP Examples

Ruby Examples

Running the Examples: Python

3.2.2 Alerting Framework

Requirements:

  • RabbitMQ server (2.6.1 or later) running on localhost.
  • RabbitMQ user needed:
    • Username: alert_user
    • Password: alertme
    • Permissions: read,write,config

Running the Consumer: python 3.2.2_alert_consumer.py

Running the Producer: python 3.2.2_alert_producer.py -r ROUTING_KEY -m MESSAGE

3.3.3 RPC Example

Requirements:

  • RabbitMQ server (2.6.1 or later) running on localhost.
  • RabbitMQ user needed:
    • Username: rpc_user
    • Password: rpcme
    • Permissions: read,write,config

Running the Server: python 3.3.3_rpc_server.py Running the Client: python 3.3.3_rpc_server.py

Running the Examples: PHP

  • RabbitMQ server (2.6.1 or later) running on localhost.
  • RabbitMQ user needed:
    • Username: guest
    • Password: guest

To run the PHP scripts simply do:

    php script_name.php

Running the Examples: Ruby

  • RabbitMQ server (2.6.1 or later) running on localhost.
  • RabbitMQ user needed:
    • Username: guest
    • Password: guest

To run examples do

ruby chapter-1/hello_world_consumer.rb

and so on. Or, if you use Bundler

bundle exec ruby chapter-1/hello_world_consumer.rb

Note to contributors

BY CONTRIBUTING TO THE RABBITMQ IN ACTION SOURCE CODE REPOSITORY YOU AGREE TO LICENSE YOUR CONTRIBUTION UNDER THE TERMS OF THE BSD LICENSE AS SPECIFIED IN THE 'LICENSE.md' FILE IN THIS DIRECTORY.