Skip to content
Advertisement

How to setup Elixir project to use RabbitMQ via amqp?

I want to use rabbitMQ from my elixir phoenix app via amqp. I followed tutorial on official website but still during mix.deps compile, I get an error:

JavaScript

Terminal screenshot

I added only :amqp and {:amqp, “~> 0.1.4”}, in mix.exs file:

JavaScript

What changes I need to make, to have my elixir app work with rabbitMQ?

Thank you

Advertisement

Answer

It is a reported issue in the :amqp project (https://github.com/pma/amqp/issues/28) It fails compilation with Erlang 19. The problem lies in :amqp_client. The last version in the repository is fixed, but it does not exist as a hex package yet.

Update 2016-08-16:

If you want to use AMQP with Erlang 19 in your project just add the current :amqp_client dependency to override the one that comes with AMQP:

JavaScript

For this concrete example you should have something like:

JavaScript

Important: You should override the :amqp_client dependency in projects that use AMQP event if their mix file is already overriding the dependency.

I hope this helps.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement