Examples for connecting using AMQP 1.0 client

191 views
Skip to first unread message

shank...@gmail.com

unread,
Nov 6, 2018, 1:07:41 AM11/6/18
to rabbitmq-users
Hi,
There are several example available at https://github.com/rabbitmq/rabbitmq-tutorials/tree/master/elixir for using AMQP  0-9-1. 

Wondering if there is any example available for connecting using https://github.com/rabbitmq/rabbitmq-amqp1.0-client

Thanks,
Shankardevy

Karl Nilsson

unread,
Nov 6, 2018, 4:30:26 AM11/6/18
to rabbitm...@googlegroups.com
Hi,

I'm afraid there isn't much in terms of examples for the AMQP 1.0 client apart from what is in the README as I'm sure you've already seen. The erlang interop for elixir
is very good so hopefully it shouldn't be too difficult to translate the example from the README.


Cheers
Karl

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shankardevy

unread,
Nov 6, 2018, 7:15:54 AM11/6/18
to rabbitm...@googlegroups.com
Hi Karl,
Thanks for your time. 

I tried this on my elixir app already using iex.

conf  =                                                                                                       
%{
  container_id: "test_container",
  port: 5672,
  sasl: {:plain, "RootManageSharedAccessKey",
   "key"},
  tls_opts: {5672, [versions: ['tlsv1.1']]}
}

 :amqp10_client.open_connection conf


And I get the following error in a few seconds posted to my iex shell.

[warn] Socket closed while in state 'expecting_frame_body'

[warn] terminating reader with ':normal'

[info] Conn received DOWN from Reader :normal :hdr_sent

[warn] terminating connection with ':normal'


Someone else on Elixirforum also tried to work like this but had reached a deadend: https://elixirforum.com/t/connecting-to-azure-service-bus-with-rabbitmq-amqp1-0-client/15665

Any help to solve this error? or directions to look into for me to debug the error?

Karl Nilsson

unread,
Nov 6, 2018, 7:39:47 AM11/6/18
to rabbitm...@googlegroups.com
For AMQP you need to use port 5671. AFAIK 5672 is only for HTTP.

Cheers
Karl

Shankardevy

unread,
Nov 6, 2018, 9:44:12 AM11/6/18
to rabbitm...@googlegroups.com
Hi Karl,
I get the same error even when I try the port 5671.

> [warn] Socket closed while in state 'expecting_frame_body'

Reply all
Reply to author
Forward
0 new messages