Compiling project using rebar3 with RabbitMQ amqp_client

405 views Asked by At

Updated: Using hex instead of git for adding dependencies to rebar.config solved the problem. Use format {amqp_client, "3.7.8"}, {rabbit_common, "3.7.8"}.

Original Question - I'm having a real difficult time with integrating the RabbitMQ amqp_client into an existing Erlang application. I got it to work for testing but it is an ugly way to do it.

My steps:

added amqp_client to rebar.config deps and relx, at compile time this gave a message that amqp_client.app was not found

went into ./_build/default/lib/amqp_client/ and ran make, reran rebar3 release

got error about missing rabbit_common file/folder, added it to rebar.config deps and relx

reran rebar3 release, got a message that rabbit_common.app is missing

went to ./_build/default/lib/rabbit_common and ran make

reran rebar3 release

application compiled

ran rebar3 shell and got an error about jsx.app missing, added to rebar.config deps and relx

you see the pattern...

same for ranch, ranch_proxy_protocol, recon.

It works now, but there must be a better way?

1

There are 1 answers

0
2240 On

According to the docs (1) you can add the following to deps.

{amqp_client, "3.12.7"}

It will include rabbit_common. The edocs can be found here.