[rabbitmq-discuss] Channels closed unexpectedly in Java client

Matthew Sackman matthew at rabbitmq.com
Wed Sep 14 14:42:02 BST 2011


On Wed, Sep 14, 2011 at 02:39:05PM +0100, Matthew Sackman wrote:
> -module(test).
> -compile([export_all]).
> 
> -include_lib("amqp_client/include/amqp_client.hrl").
> 
> loadsa_queues() ->
>     {ok, Conn} = amqp_connection:start(#amqp_params_network{}),
>     {ok, Chan} = amqp_connection:open_channel(Conn),
>     Method = #'basic.publish'{},
>     Content = #amqp_msg { props = #'P_basic'{ delivery_mode = 2 },
>                           payload = <<0:8>> },
>     [begin
>          #'queue.declare_ok'{ queue = Q } =
>              amqp_channel:call(Chan, #'queue.declare'{durable = true, exclusive = true}),
>          amqp_channel:cast(Chan, Method#'basic.publish'{ routing_key = Q }, Content)
>      end || _ <- lists:seq(1,100000)],
>     amqp_connection:close(Conn).

Oh yes, seeing as I've just run into this myself, there's currently a
performance issue with deleting an awful lot of queues at the same time
- reported at
  http://old.nabble.com/Problem-auto-deleting-large-number-of-queues--td32346666.html
- we are working on a fix for this right now, but it wasn't ready in
time for 2.6.1. The bug is actually in Erlang/OTP itself. So if you find
you tests taking a huge amount of time deleting a lot of queues, it's
that bug, and erm, thus "nothing to worry about" ;)

Matthew


More information about the rabbitmq-discuss mailing list