rabbitmq-tutorials/elixir
2023-08-20 10:47:14 +04:00
..
config update for later versions of elixir and amqp lib 2018-07-11 11:15:50 -06:00
.gitignore add Elixir tutorial 1 2015-12-21 23:43:01 -08:00
emit_log_direct.exs Add Elixir source for tutorial 4 2015-12-22 00:38:08 -08:00
emit_log_topic.exs add Elixir source for tutorial 5 2015-12-22 12:14:39 -08:00
emit_log.exs add Elixir source for tutorial 3 2015-12-21 23:43:01 -08:00
mix.exs Elixir: update RabbitMQ client to 3.3 2023-08-20 10:47:14 +04:00
new_task.exs sync with upstream tutorial wording changes 2015-12-21 23:43:01 -08:00
README.md URL Cleanup 2019-03-20 03:25:16 -05:00
receive_logs_direct.exs Add Elixir source for tutorial 4 2015-12-22 00:38:08 -08:00
receive_logs_topic.exs add Elixir source for tutorial 5 2015-12-22 12:14:39 -08:00
receive_logs.exs add Elixir source for tutorial 3 2015-12-21 23:43:01 -08:00
receive.exs update for later versions of elixir and amqp lib 2018-07-11 11:15:50 -06:00
rpc_client.exs add Elixir source for tutorial 6 2016-01-08 14:20:52 -08:00
rpc_server.exs add Elixir source for tutorial 6 2016-01-08 14:20:52 -08:00
send.exs add Elixir tutorial 1 2015-12-21 23:43:01 -08:00
worker.exs update for later versions of elixir and amqp lib 2018-07-11 11:15:50 -06:00

Elixir code for RabbitMQ tutorials

Here you can find an Elixir port of RabbitMQ tutorials.

Requirements

To run this code you need a recent Elixir version installed, which should include Mix, the Elixir build tool.

These tutorials use Elixir AMQP 0-9-1 client built on top of the official RabbitMQ Erlang client.

To install dependencies with Mix, run

mix deps.get
mix deps.compile

Code

To run the examples, use mix run.

Tutorial one: "Hello World!":

mix run receive.exs
mix run send.exs

Tutorial two: Work Queues

mix run worker.exs
mix run new_task.exs

Tutorial three: Publish/Subscribe

mix run receive_logs.exs
mix run emit_log.exs

Tutorial four: Routing

mix run receive_logs_direct.exs --info --warning
mix run emit_log_direct.exs --info "A message"

Tutorial five: Topics

mix run receive_logs_topic.exs "info.*" "warn.*"
mix run emit_log_topic.exs "info.connections" "Connected"

Tutorial six: RPC (Request/Response)

mix run rpc_server.exs
mix run rpc_client.exs