[rabbitmq-discuss] RabbitMQ Erlang API questions

Lev Walkin vlm at lionet.info
Fri Apr 10 09:38:36 BST 2009


Lev Walkin wrote:
> Matthias Radestock wrote:
>> Lev,
>>
>> Lev Walkin wrote:
>>> I've started using Erlang native API to RabbitMQ recently (cloned out 
>>> of v1_5 branch) and found a couple of issues I'd like someone "in the 
>>> know" to clarify:
>>>
>>> 1. lib_amqp:close_channel(lib_amqp:start_channel()) leaks processes:
>> That looks like a bug. Do you get the same results against the default 
>> branch (of the erlang-client and rabbitmq-server)?
> 
> Have not tried the default branch.

The default branch for the client won't work with 1.5.4 server:

=== downloaded 1.5.4 server === def branch client ===
[vlm at test-amq ~/rabbitmq-erlang-client]> gmake test_direct
erl -pa ebin rabbitmq_server/ebin -noshell -mnesia dir tmp -boot 
start_sasl -s rabbit -noshell \
	-sasl sasl_error_logger '{file, "'/tmp'/rabbit-sasl.log"}' \
	-kernel error_logger '{file, "'/tmp'/rabbit.log"}' \
	-eval 'direct_client_test:test(),halt().'
RabbitMQ 1.5.4 (AMQP 8-0)
Copyright (C) 2007-2009 LShift Ltd., Cohesive Financial Technologies 
LLC., and Rabbit Technologies Ltd.
Licensed under the MPL.  See http://www.rabbitmq.com/

Logging to "/tmp/rabbit.log"
SASL logging to "/tmp/rabbit-sasl.log"

starting database             ...done
starting core processes       ...done
starting recovery             ...done
starting persister            ...done
starting guid generator       ...done
starting builtin applications ...done
starting TCP listeners        ...done

broker running
direct_client_test:basic_get_test...*failed*
::exit:{{undef,[{rabbit_channel,start_link,
                               [1,<0.199.0>,<0.199.0>,<<"guest">>,<<"/">>]},
               {amqp_direct_driver,open_channel,3},
               {amqp_connection,handle_open_channel,2},
               {gen_server,handle_msg,5},
               {proc_lib,init_p_do_apply,3}]},
       {gen_server,call,[<0.198.0>,{open_channel,none,<<>>}]}}
   in function gen_server:call/2
   in call from test_util:basic_get_test/1

===================================================


If I check out the default branch server and the client, the following 
happens (pretty close to the above mismatch errors):

=== def branch server === def branch client ===

[vlm at test-amq ~/rabbitmq-erlang-client]> gmake test_direct
erl -pa ebin rabbitmq_server/ebin -noshell -mnesia dir tmp -boot 
start_sasl -s rabbit -noshell \
	-sasl sasl_error_logger '{file, "'/tmp'/rabbit-sasl.log"}' \
	-kernel error_logger '{file, "'/tmp'/rabbit.log"}' \
	-eval 'direct_client_test:test(),halt().'
RabbitMQ %%VERSION%% (AMQP 8-0)
Copyright (C) 2007-2009 LShift Ltd., Cohesive Financial Technologies 
LLC., and Rabbit Technologies Ltd.
Licensed under the MPL.  See http://www.rabbitmq.com/

Logging to "/tmp/rabbit.log"
SASL logging to "/tmp/rabbit-sasl.log"

starting database             ...done
starting core processes       ...done
starting recovery             ...done
starting persister            ...done
starting guid generator       ...done
starting builtin applications ...done
starting TCP listeners        ...done

broker running
direct_client_test:basic_qos_test...*timed out*
^C
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
        (v)ersion (k)ill (D)b-tables (d)istribution
^C
[vlm at test-amq ~/rabbitmq-erlang-client]>
================================================

In my case, however, the 1.5.4 server and v1_5 client work together 
without a problem (except for process leaks described).

-- 
Lev Walkin
vlm at lionet.info




More information about the rabbitmq-discuss mailing list