[rabbitmq-discuss] rabbitmq erlang client
Orion Henry
orion.henry at gmail.com
Thu Nov 6 21:19:21 GMT 2008
Hello,
I'm trying to get the rabbitmq-erlang-client to work and I've not been
able. My ruby client has been working great and is already in
production but currently my erlang app needs to os:cmd("publish.rb")
and I'd like to keep that in the erlang vm for obvious reasons.
My test code looks like this:
test_client() ->
io:format("--- begin~n"),
Connection =
amqp_connection:start_link("mylogin","mypass","127.0.0.1",<<"/myvhost">>),
io:format("--- got Connection = ~p.~n",[Connection]),
Channel = amqp_connection:open_channel(Connection),
io:format("--- got Channel = ~p.~n",[Channel]).
this seems to work ok but I get a "Have a look into this one: closed"
message a split second later. If I add anymore code, such as a
X2 = lib_amqp:declare_exchange(Channel, <<"abc">>),
I get this error. (I'm not very good yet at understanding erlang
error message so please forgive me if this is obvious).
=ERROR REPORT==== 6-Nov-2008::13:16:28 ===
Error in process <0.35.0> with exit value:
{badarg,[{rabbit_framing,encode_method_fields,1},{rabbit_binary_generator,build_simple_method_frame,2},{rabbit_writer,internal_send_command_async,3},{rabbit_writer,handle_message,2},{rabbit_writer,mainloop,1}]}
{"init terminating in
do_boot",{{function_clause,[{amqp_channel,handle_info,[{'EXIT',<0.35.0>,{badarg,[{rabbit_framing,encode_method_fields,1},{rabbit_binary_generator,build_simple_method_frame,2},{rabbit_writer,internal_send_command_async,3},{rabbit_writer,handle_message,2},{rabbit_writer,mainloop,1}]}},{channel_state,1,<0.28.0>,<0.32.0>,<0.35.0>,#Fun<amqp_network_driver.do.2>,#Fun<amqp_network_driver.do.3>,#Fun<amqp_network_driver.close_channel.1>,{[{{<0.1.0>,#Ref<0.0.0.36>},{'exchange.declare',undefined,<<3
bytes>>,<<6 bytes>>,false,false,false,false,false,[]}}],[]},{[],[]},{dict,0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},false,undefined,{dict,0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}}]},{gen_server,handle_msg,5},{proc_lib,init_p,5}]},{gen_server,call,[<0.34.0>,{call,{'exchange.declare',undefined,<<3
bytes>>,<<6 bytes>>,false,false,false,false,false,[]}}]}}}
I'm currently using erlang client 3a9ce636e283 and rabbitmq_server
200803291005. That said I have not been able to get the erlang make
all_tests work against the rabbitmq server.
More information about the rabbitmq-discuss
mailing list