[rabbitmq-discuss] basic design question

Matthias Radestock matthias at lshift.net
Wed Apr 22 07:29:24 BST 2009


Isaac,

Isaac Cambron wrote:
> I did get the tip revision to work

Careful. Please make sure you use the default branch, i.e. do
   hg update -C default

>                 ch.BasicConsume("myqueue", true, null, consumer);
>                 ch.BasicQos(0, 1, false);

There's your problem:

1) I wrote "set the basic.qos prefetch count to 1, *and then* subscribe 
to [...] the queues", i.e. you need to issue the BasicQos *before* the 
BasicConsume.

2) The second parameter to basicConsume, noAck, must be set to false, 
otherwise the server will automatically ack the messages as soon as it 
sends them, which makes the qos settings ineffective - I suggest you 
simply use the three-arg version of BasicConsume, which sets noAck=false.


Regards,

Matthias.




More information about the rabbitmq-discuss mailing list