I've built a small set of scripts that work with bunny and decided to use a queue because some of my data processing can fall very far behind the activity that's generating the work, so a queue seemed a natural fit here.
I discovered that when I use queue.subscribe, the consumer will take messages off of the queue regardless of whether or not it's ready to execute the block. This isn't too problematic, but if my consumer crashes or if I kill it, I'll lose every message that was waiting to be worked on. I also can't use the management GUI to tell how much work is left for the consumer because my queues are always empty.
So I've switched to using queue.pop, but now I don't have automagic rabbit-connection error recovery and presumably need to implement error catching where I wrap my queue.pop block inside of a begin block... but I'm not really sure which exception I should rescue. Should I just rescue Bunny::Exception every time if what I really want is for my workers to try again as soon as the queue is available? Will the rest of the connections (channel, exchange, queue) all come back up automatically?
Also, could anyone perhaps point me to a reference implementation that behaves the way I'm desiring my application to function? The Bunny docs cover using queue.pop, but doesn't have any error rescuing behavior documented along with it.