rabbitmq-tutorials/erlang
2024-06-18 23:19:43 +09:00
..
.gitignore Add Makefile and update code to make Erlang samples easier to run 2019-03-08 16:02:05 -08:00
emit_log_direct.erl untabify and fix indentation 2022-09-29 13:42:56 -07:00
emit_log_topic.erl untabify and fix indentation 2022-09-29 13:42:56 -07:00
emit_log.erl untabify and fix indentation 2022-09-29 13:42:56 -07:00
Makefile Update code to reflect rebar3 usage 2022-09-28 10:29:04 -04:00
new_task.erl untabify and fix indentation 2022-09-29 13:42:56 -07:00
README.md Update README.md with corrected links 2024-06-18 23:19:43 +09:00
rebar.config Update amqp client version 2023-08-07 22:42:40 -07:00
receive_logs_direct.erl Update code to reflect rebar3 usage 2022-09-28 10:29:04 -04:00
receive_logs_topic.erl Update code to reflect rebar3 usage 2022-09-28 10:29:04 -04:00
receive_logs.erl Update code to reflect rebar3 usage 2022-09-28 10:29:04 -04:00
receive.erl Update code to reflect rebar3 usage 2022-09-28 10:29:04 -04:00
send.erl untabify and fix indentation 2022-09-29 13:42:56 -07:00
worker.erl untabify and fix indentation 2022-09-29 13:42:56 -07:00

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 also need rebar3: https://www.rebar3.org/docs/getting-started/

You need Erlang Client binaries:

make all

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