ruby-amqp/bunny — pull request #27 by MikeEmery (2011-10-12 22:13:29+00:00)
Title: 0.7.x stable

Adding the ability to automatically break out of a subscription if there are no more messages to process.

Background: We're using bunny to do RPC with RabbitMQ. There are occasionally situations where the client gives up waiting for a response because of a timeout, but the remote is still processing the message and puts it on the response queue. When the next RPC call is made, there are two messages waiting on the respone queue and I only want to subscribe to the queue until those messages have been processed (presumably the last message is the one I'm interested in).

I dont know if this is something the official gem wants to support, but I figured I would share the change.