[rabbitmq-discuss] Durable queue disappears

Ben Hood 0x6e6562 at gmail.com
Wed Sep 10 22:39:59 BST 2008

Hey Dmitriy,

On Wed, Sep 10, 2008 at 9:18 PM, Dmitriy Samovskiy
<dmitriy.samovskiy at cohesiveft.com> wrote:
> If you run the script below (uses py-amqplib) without a basic_consume call, a queue still
> exists in rabbit_amqqueue:stat_all() output after the script exits. However, if you run
> the same script with basic_consume call, a queue will exist in stat_all output while the
> script is running, but will disappear after the script exits.
> This is with rabbitmq-server 1.4.0 on debian. During this test, there are no messages
> published to amq.direct with "bar" routing key.

I have just run the script that you posted and I can verify the
behaviour you are talking about.

So I ran an equivalent test using the Rabbit Java client:

public static void main(String[] args) throws Exception {
        Connection con = new ConnectionFactory().newConnection("", 5672);
        Channel channel = con.createChannel();

        String q = "foo" + System.currentTimeMillis();

        channel.queueDeclare(1, q, true);
        channel.basicConsume(1, q, new QueueingConsumer(channel));


        channel.close(200, "hasta la vista, baby");

I left out the binding for brevity's sake.

When I run this, the queue that you declare is durable and shows up
using stat_all and also when you restart the broker.

So the next step might be to have a deeper look into the code of
py-amqplib to see if there are any clues there.

Maybe Barry can help out with this?

Sorry I can't much further at this stage,


More information about the rabbitmq-discuss mailing list