[rabbitmq-discuss] Strange behaviour in example_get
Emile Joubert
emile at rabbitmq.com
Wed Nov 13 10:43:41 GMT 2013
On 12/11/13 09:45, fercascue wrote:
> while (1) {
> qu2->Get(AMQP_NOACK);
> AMQPMessage * m=qu2->getMessage();
> cout << "count: "<< m->getMessageCount() << endl;
> cout << "message\n"<< m->getMessage()
The original version of the example had a condition to guard against an
empty queue:
if (m->getMessageCount() > -1)
That condition is absent from your code which is why it fails.
-Emile
More information about the rabbitmq-discuss
mailing list