iancooper/Paramore — pull request #25 by BobFromHuddle (2014-12-09 13:43:07+00:00)
Title: Queue Consumer is created in connect phase

The previous version of the code created a new QueueingBasicConsumer for
every call to Receive().

This had unintended consequences. Specifically:

* The client code called Receive
* The channel received a message and passed it to the consumer.
* The client code dequeued from the consumer and processed the message
* The client code ACKd the message
* The channel pre-fetched a new message and passed it to the consumer
* The client code called Receive, ignoring the pre-fetched message on the
now forgotten consumer

This led to every second message being ignored, and to messages never
being received if the queue was empty when the service started.

Weirdness has now ceased.