Hi again,

I think what you want is to set prefetch_count:
http://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.qos.prefetch-count This way, you'll only have one message at a time, and you can use ack to get the next message.

This causes a new problem : when my client both receives and publishes messages, I must set the prefetch-count to 0 (or not set it at all) or the messages stop being received when the first message is published by this client.

I have a sample code to demonstrate the problem :
http://pastebin.com/eyWSwqkh

If you run it on a filled server queue, with the PREFETCH_COUNT global variable set to anything different from 1 or None (which will not make the basic_qos call), you'll see the client receive a few messages, then publish one message, then process the remaining prefetched messages until the DeferredQueue is empty. But no new messages will be received.

Any idea where this comes from, or what I'm doing wrong ?
Thanks !

Aurélien

--
http://www.projet-vigilo.org
http://www.c-s.fr/LL_r168.html
Tél : +33 1 41 28 44 33


_______________________________________________
Mailing list: https://launchpad.net/~txamqp-user
Post to     : txamqp-user@lists.launchpad.net
Unsubscribe : https://launchpad.net/~txamqp-user
More help   : https://help.launchpad.net/ListHelp

Reply via email to