Skip to content

Latest commit

 

History

History
 
 

erlang

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Erlang code for RabbitMQ tutorials

Here you can find a Erlang code examples from RabbitMQ tutorials.

This code is using RabbitMQ Erlang Client (User Guide).

Requirements

To run this code you need at least Erlang R13B03, on Ubuntu you can get it using apt:

sudo apt-get install erlang

You need Erlang Client binaries:

wget http://www.rabbitmq.com/releases/plugins/v2.2.0/rabbit_common-2.2.0.ez
unzip rabbit_common-2.2.0.ez

wget http://www.rabbitmq.com/releases/plugins/v2.2.0/amqp_client-2.2.0.ez
unzip amqp_client-2.2.0.ez

Code

Tutorial one: "Hello World!":

./send.erl
./receive.erl

Tutorial two: Work Queues:

./new_task.erl "A very hard task which takes two seconds.."
./worker.erl

Tutorial three: Publish/Subscribe:

./emit_log.erl "info: This is the log message"
./receive_logs.erl