Skip to content

Files

Latest commit

3f46962 · May 1, 2017

History

History
This branch is 802 commits behind rabbitmq/rabbitmq-tutorials:main.

elixir

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 22, 2015
Feb 7, 2016
Dec 22, 2015
Dec 22, 2015
Dec 22, 2015
May 1, 2017
Dec 22, 2015
Dec 22, 2015
Dec 22, 2015
Dec 22, 2015
Dec 22, 2015
Jan 8, 2016
Jan 8, 2016
Dec 22, 2015
Jan 9, 2016

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