Comment 3 for bug 1338732

Revision history for this message
Noel Burton-Krahn (noelbk) wrote :

The problem is that the rabbit queues declared for RPC are not durable, so if the receiver is reconnecting when the sender replies. the reply will be deleted when the queue is deleted. Here's how it goes:

1. Sender sends RPC call
2. Receiver gets call, acknowledges
3. Rabbit dies
4. Sender gets connection dropped error, waits 1 sec to reconnect
5. Receiver connects (successfully), sends reply to reply_queue and disconnects
6. Rabbit deletes the reply queue when the receiver disconnects because it's not durable and there are no other connections
7. Sender reconnects to rabbit
8. Sender waits for reply (that was deleted earlier), times out, fails, does not retry
9. RPC call fails

I've been looking for a way of setting durability on RPC queues in impl_rabbit.py. It supports an "amqp_durable_queues" config option, but only for TopicConsumer objects. The RPC mechanism uses DirectConsumer objects, and there's no way to set the durable option on a queue during an RPC call. There's no way for a RPC client to pass durable=True to _declare_consumer.