关于rabbitmq-erlang-client的一些错误

时间:2016-05-20 07:38:08

标签: rabbitmq

我试图使用rabbitmq-erlang-client,并对程序引发的错误感到困惑。 我流了system_SUITE:queue_unbind/1但是在设置Exchange和队列时会抛出错误:

%% code
amqp_channel:call(Channel, #'exchange.declare'{exchange = X}),
amqp_channel:call(Channel, #'queue.declare'{queue = Q}),



%%  it throw me same errors again and again:
** Last message in was setup_exchange_queue
** When Server state == {state,
                            {amqp_params_network,<<"username">>,<<"password">>,
                                <<"/">>,"192.168.1.173",5672,0,0,10,infinity, 
                                none,
                                [#Fun<amqp_auth_mechanisms.plain.3>,
                                 #Fun<amqp_auth_mechanisms.amqplain.3>],
                                [],[]},
                            <0.74.0>,<0.83.0>,<<"amq.direct">>,<<"queue">>,
                            <<"my_queue">>,undefined,undefined}
** Reason for termination == 
** {{noproc,{gen_server,call,[<0.83.0>,{close,200,<<"Goodbye">>},infinity]}}, 
    [{gen_server,call,3,[{file,"gen_server.erl"},{line,212}]},
     {mrbq,terminate,2,[{file,"src/mrbq.erl"},{line,244}]},
     {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}]}]}
** exception exit: {noproc,
                       {gen_server,call,
                           [<0.83.0>,{close,200,<<"Goodbye">>},infinity]}}

代码审核amqp_channel.erl

%% call
call/2 -> gen_server:call/2  
handle_call/3 -> handle_method_to_server/6  

转到第573行,然后第888行,然后{noreply, State}返回 call

上述步骤有什么问题? 怎么办才能使它好起来?

我曾尝试cast/2,并且没有发生任何错误。但这不是我需要的。

0 个答案:

没有答案