Switch branches/tags
Nothing to show
Find file History
Latest commit 2551cb0 Jan 16, 2018
Permalink
..
Failed to load latest commit information.
README.md add recon Jan 16, 2018
emit_log.erl add recon Jan 16, 2018
emit_log_direct.erl add recon Jan 16, 2018
emit_log_topic.erl add recon Jan 16, 2018
new_task.erl add recon Jan 16, 2018
receive.erl add recon Jan 16, 2018
receive_logs.erl add recon Jan 16, 2018
receive_logs_direct.erl add recon Jan 16, 2018
receive_logs_topic.erl add recon Jan 16, 2018
send.erl add recon Jan 16, 2018
worker.erl add recon Jan 16, 2018

README.md

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 https://www.rabbitmq.com/releases/rabbitmq-erlang-client/v3.6.14/rabbit_common-3.6.14.ez
unzip rabbit_common-3.6.14.ez
ln -s rabbit_common-3.6.14 rabbit_common

wget https://www.rabbitmq.com/releases/rabbitmq-erlang-client/v3.6.14/amqp_client-3.6.14.ez
unzip amqp_client-3.6.14.ez
ln -s amqp_client-3.6.14 amqp_client

wget https://www.rabbitmq.com/releases/rabbitmq-erlang-client/v3.6.14/recon-2.3.2.ez
unzip recon-2.3.2.ez
ln -s recon-2.3.2 recon

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:

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

Tutorial four: Routing:

./receive_logs_direct.erl info
./emit_log_direct.erl info Hello

Tutorial five: Topics:

./receive_logs_topic.erl "*.rabbit"
./emit_log_topic.erl red.rabbit Hello