<DIV>hi,</DIV>
<DIV> </DIV>
<DIV>I use erlang client connecting to rabbitmq broker, when i stop rabbitmq server , in the side of erlang client, there is a error log, but the client can send the message all the same without error?</DIV>
<DIV> </DIV>
<DIV>log is like this </DIV>
<DIV> </DIV>
<DIV>Sending......<BR>Satus:ok.</DIV>
<DIV>=ERROR REPORT==== 16-Jun-2011::13:55:34 ===<BR>** Generic server <0.38.0> terminating <BR>** Last message in was socket_closed<BR>** When Server state == {state,amqp_network_connection,<BR> {state,#Port<0.771>,0,<0.44.0>,131072,<BR> {server_initiated_close,320,<BR> <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>},<BR> false},<BR> <0.37.0>,<0.40.0>,<BR> {amqp_params_network,<<"goomemq">>,<BR> <<"erlang2goomemq">>,<<"/">>,"localhost",5672,<BR> 0,0,0,none,<BR> [#Fun<amqp_auth_mechanisms.plain.3>,<BR> #Fun<amqp_auth_mechanisms.amqplain.3>],<BR> []},<BR> 0,<BR> [{<<"capabilities">>,table,<BR> [{<<"publisher_confirms">>,bool,true},<BR> {<<"exchange_exchange_bindings">>,bool,true},<BR> {<<"basic.nack">>,bool,true},<BR> {<<"consumer_cancel_notify">>,bool,true}]},<BR> {<<"copyright">>,longstr,<BR> <<"Copyright (C) 2007-2011 VMware, Inc.">>},<BR> {<<"information">>,longstr,<BR> <<"Licensed under the MPL. See <A href="http://www.rabbitmq.com/">http://www.rabbitmq.com/</A>">>},<BR> {<<"platform">>,longstr,<<"Erlang/OTP">>},<BR> {<<"product">>,longstr,<<"RabbitMQ">>},<BR> {<<"version">>,longstr,<<"2.4.0">>}],<BR> #Fun<amqp_connection_sup.0.39273983>,<BR> #Fun<amqp_connection_sup.2.54430129>,<BR> {closing,server_initiated_close,<BR> {'connection.close',320,<BR> <<"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'">>,<BR> 0,0},<BR> none}}<BR>** Reason for termination == <BR>** socket_closed_unexpectedly</DIV>
<DIV>Sending......<BR>Satus:ok.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>my code is like this:</DIV>
<DIV>sendmq() -></DIV>
<DIV> {ok,Conn1} = amqp_connection:start(#amqp_params_network{username= <<"guest">> ,password= <<"guest">> }),<BR> {ok,C1} = amqp_connection:open_channel(Conn1),<BR> Q1 = #'queue.declare'{queue = <<"goome_queue1">>}, #'queue.declare_ok'{} = amqp_channel:call(C1, Q1),<BR> E1 = #'exchange.declare'{exchange = <<"goome_exchange1">>}, #'exchange.declare_ok'{} = amqp_channel:call(C1, E1),<BR> B1 = #'queue.bind'{queue = <<"goome_queue1">>,<BR> exchange = <<"goome_exchange1">>,<BR> routing_key = <<"goomeRk1">>},</DIV>
<DIV> #'queue.bind_ok'{} = amqp_channel:call(C1, B1),<BR> P1 = #'basic.publish'{exchange = <<"goome_exchange1">>, routing_key = <<"goomeRk1">>},</DIV>
<DIV> loop(C1,P1).</DIV>
<DIV> </DIV>
<DIV>loop(Channel,Publish)-><BR> io:format("Sending......~n"),<BR> Status = amqp_channel:cast(Channel, Publish, #amqp_msg{payload = <<"test">>}),<BR> io:format("Satus:~p.~n",[Status]),<BR> timer:sleep(1000),<BR> loop(Channel,Publish).</DIV>
<DIV> </DIV>