[rabbitmq-discuss] Durable exchanges

Valentino Volonghi dialtone at gmail.com
Mon Jan 12 23:22:22 GMT 2009

I'm wondering if they have any difference at all with non durable ones
in rabbitmq. The reason why I'm asking is because I want to change the
least possible in the rabbitmq-erlang-client and I see that it supports
declaring durable queues easily but not durable exchanges easily.

Considering this I've tried creating a non durable exchange with a  
queue and persistent messages and to my "surprise" even after consuming
all the messages in the queue I was still able to access the queue  
with the
messages even through restarts.

This is a small part of the consumer:
     ch.exchange_declare(exchange, type='topic', auto_delete=False)
     qname, _, _ = ch.queue_declare(queue, durable=True,  
     ch.queue_bind(queue, exchange, routing_key=sys.argv[2])
     ch.basic_consume(queue, callback=callback)

This is a small part of the producer:
         self.ch.exchange_declare(exchange, type='topic',  
         msg = amqp.Message(body, delivery_mode=2)
         self.ch.basic_publish(msg, self.exchange, routing_key=key)

As you see I don't specify anything in the exchange_declare and by  
in py-amqplib is durable=False.

I tried both restarting rabbitmq with messages in the queue and then  
them. And then I tried with empty queue and then sending after  
restart, since I
don't create a queue in the producer it should fail or lose the  
message but instead
it's correctly delivered when I start the consumer.

Is this the expected behavior and I can avoid patching this part of the

Valentino Volonghi aka Dialtone
Now running MacOS X 10.5
Home Page: http://www.twisted.it

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090112/b5f1e2cb/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090112/b5f1e2cb/attachment.pgp 

More information about the rabbitmq-discuss mailing list