1

Topic: Erlang and RabbitMQ Client

I write Erlang the client for RabbitMQ. I am connected so: {ok, Connection} = amqp_connection:start ({network, #amqp_params_network {username = <<"my_client">>, password = <<"password">>, virtual_host = <<"my_vhost">>, host = "mydomain.com"}}) I launch this all with eunit, i.e. rebar clean compile eunit and I receive  (more low). A question: probably I not correctly or launch differently not clearly that means the stack-trejs below. =ERROR REPORT ==== 17-Jan-2016:: : 21:10:49 === ** Generic server <0.97.0> terminating ** Last message in was connect ** When Server state == {<0.96.0>, {network, {amqp_params_network, <<"my_client">>, <<"mypassword">>, <<"my_vhost">>, "mydomain.com", undefined, 0,0,0, infinity, none, [#Fun<amqp_auth_mechanisms.plain.3>, #Fun<amqp_auth_mechanisms.amqplain.3>], [], []}}} ** Reason for termination == ** {function_clause, [{amqp_gen_connection, terminate, [{function_clause, [{amqp_connection_type_sup, type_module, [{network, {amqp_params_network, <<"my_client">>, <<"mypassword">>, <<"my_vhost">>, "mydomain.com", undefined, 0,0,0, infinity, none, [#Fun<amqp_auth_mechanisms.plain.3>, #Fun<amqp_auth_mechanisms.amqplain.3>], [], []}}], [{file, "src/amqp_connection_type_sup.erl"}, {line, 35}]}, {amqp_gen_connection, handle_call, 3, [{file, "src/amqp_gen_connection.erl"}, {line, 163}]}, {gen_server, try_handle_call, 4, [{file, "gen_server.erl"}, {line, 629}]}, {gen_server, handle_msg, 5, [{file, "gen_server.erl"}, {line, 661}]}, {proc_lib, init_p_do_apply, 3, [{file, "proc_lib.erl"}, {line, 240}]}]}, {<0.96.0>, {network, {amqp_params_network, <<"my_client">>, <<"clientpassword">>, <<"my_vhost">>, "mydomain.com", undefined, 0,0,0, infinity, none, [#Fun<amqp_auth_mechanisms.plain.3>, #Fun<amqp_auth_mechanisms.amqplain.3>], [], []}}}], [{file, "src/amqp_gen_connection.erl"}, {line, 230}]}, {gen_server, try_terminate, 3, [{file, "gen_server.erl"}, {line, 643}]}, {gen_server, terminate, 7, [{file, "gen_server.erl"}, {line, 809}]}, {proc_lib, init_p_do_apply, 3, [{file, "proc_lib.erl"}, {line, 240}]}]} *failed* in function gen_server:call/3 (gen_server.erl, line 212) in call from myapp_token:login/0 (src/myapp_token.erl, line 18) in call from myapp_app_test:simple_test/0 (test/myapp_app_test.erl, line 16) ** exit: {{function_clause, [{amqp_gen_connection, terminate, [{function_clause, [{amqp_connection_type_sup, type_module, [{network, {amqp_params_network, <<...>>...}}], [{file, "src/amqp_connection_type_sup.erl"}, {line, 35}]}, {amqp_gen_connection, handle_call, 3, [{file, [...]}, {line...}]}, {gen_server, try_handle_call, 4, [{file...}, {...}]}, {gen_server, handle_msg, 5, [{...} |...]}, {proc_lib, init_p_do_apply, 3, [...]}]}, {<0.96.0>, {network, {amqp_params_network, <<"my_client">>, <<"password"...>>, <<"my_v"...>>, "mydomain.com", undefined...} }}], [{file, "src/amqp_gen_connection.erl"}, {line, 230}]}, {gen_server, try_terminate, 3, [{file, "gen_server.erl"}, {line, 643}]}, {gen_server, terminate, 7, [{file, "gen_server.erl"}, {line, 809}]}, {proc_lib, init_p_do_apply, 3, [{file, "proc_lib.erl"}, {line, 240}]}]}, {gen_server, call, [<0.97.0>, connect, infinity]}} output: <<"">>

2

Re: Erlang and RabbitMQ Client

Hello, WinnieJayClay, you wrote: WJC> WJC> {ok, Connection} = amqp_connection:start ({network, #amqp_params_network {username = <<"my_client">>, WJC> WJC> I launch this all with eunit, i.e. rebar clean compile eunit and I receive  (more low). A question: probably I not correctly or launch differently not clearly that means the stack-trejs below. Judging by the documentation, it is necessary to launch so: {ok, Connection} = amqp_connection:start (#amqp_params_network {}) and at you  {network, #amqp_params_network {}} therefore and an error ` function_clause `. Does not find necessary f-tsii under such arguments.

3

Re: Erlang and RabbitMQ Client

Thanks, I start to understand an erlang broad gull