[rabbitmq-discuss] Pika from master branch - All messages arrive in 1 shot

Marek Majkowski majek04 at gmail.com
Wed Sep 21 12:14:58 BST 2011


2011/9/21 Raphaël De GIUSTI <raphael.degiusti at guardis.com>:
> When I'm running the demo_receive / demo_send example with pika from the
> master branch (pre0.9.6 i think), I'm getting a strange behaviour.
> It seems that demo_send sends its 10 messages before demo_receive actually
> receive everything in one shot. It results in a tcp backpressure problem.
> In pika 0.9.5 example, demo_receive consumes a message 1 by 1, as it
> arrives, and acks it, this is what I expect.
> Here's the output from both scripts (I added a 0.5sec sleep after sending a
> message to see what's happening) :
>
> My question is :  why all 10 messages arrive in one shot ?

That's an expected behaviour for AMQP. Take look at 'basic_qos' command.
Also, you can find our tutorials insteresting. Prose:
    http://www.rabbitmq.com/getstarted.html
code:
    https://github.com/rabbitmq/rabbitmq-tutorials/tree/master/python

Especially tutorial 2 which speaks about basic_qos:
    http://www.rabbitmq.com/tutorials/tutorial-two-python.html

Cheers,
   Marek


More information about the rabbitmq-discuss mailing list