<div>Hi</div>
<div> </div>
<div> I kept get error message while connect to rabbitmq server using rabbitmq-erlang-client library. Anyone can help, thanks.<br><br>Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:24:24] [rq:24] [async-threads:0] [kernel-poll:false]</div>
<div>Eshell V5.8.4 (abort with ^G)<br>1> test:start().</div>
<div>=ERROR REPORT==== 2-Aug-2011::08:40:18 ===<br>** Generic server <0.46.0> terminating <br>** Last message in was {inet_async,#Port<0.1109>,1,{ok,<<65,77,81,80,1,1,8>>}}<br>** When Server state == {state,#Port<0.1109>,<0.39.0>,<0.41.0>,<br>
{method,rabbit_framing_amqp_0_9_1},<br> none}<br>** Reason for termination == <br>** {{badmatch,{error,enomem}},<br> [{amqp_main_reader,handle_inet_async,2},<br>
{gen_server,handle_msg,5},<br> {proc_lib,init_p_do_apply,3}]}</div>
<div> </div>
<div> </div>
<div> </div>
<div>%%test.erl </div>
<div><br>-module(test).</div>
<div>-include_lib("amqp_client/include/amqp_client.hrl").<br>-compile(export_all).</div>
<div>start() -><br> {ok, Connection} = amqp_connection:start(#amqp_params_network{username= <<"myuser">>, password= <<"mypassword">>}),<br> {ok, Channel} = amqp_connection:open_channel(Connection),<br>
Queue = "my_queue",<br> Declare = #'queue.declare'{queue = list_to_binary(Queue), durable=true},<br> #'queue.declare_ok'{} = amqp_channel:call(Channel, Declare),<br> Get = #'basic.get'{queue = Queue},<br>
{#'basic.get_ok'{delivery_tag = Tag}, Content}<br> = amqp_channel:call(Channel, Get),<br> io:format("received message ~p", [Content]),<br> %% Close the channel<br>
amqp_channel:close(Channel),<br> %% Close the connection<br> amqp_connection:close(Connection),</div>
<div> ok.</div>