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

Gavin M. Roy gmr at myyearbook.com
Wed Sep 21 14:53:33 BST 2011


 It's worth noting that I do not consider the github master branch stable. If you're looking for the stable branch, make sure you're using 0.9.5.  

Gavin  


On Wednesday, September 21, 2011 at 5:43 AM, Raphaël De GIUSTI wrote:

> Hi everyone,
>  
> 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) :  
>  
> > >  demo_receive:
> > > demo_receive: Connected to RabbitMQ
> > > demo_receive: Received our Channel
> > > demo_receive: Queue Declared
> > > Basic.Deliver text/plain delivery-tag 1: Hello World #0: 1316597081.62437701
> > > Basic.Deliver text/plain delivery-tag 2: Hello World #1: 1316597082.62570310
> > >  Basic.Deliver text/plain delivery-tag 3: Hello World #2: 1316597083.62713790
> > > Basic.Deliver text/plain delivery-tag 4: Hello World #3: 1316597084.62860394
> > > Basic.Deliver text/plain delivery-tag 5: Hello World #4: 1316597085.63100100
> > >  Basic.Deliver text/plain delivery-tag 6: Hello World #5: 1316597086.63265109
> > > Basic.Deliver text/plain delivery-tag 7: Hello World #6: 1316597087.63385701
> > > Basic.Deliver text/plain delivery-tag 8: Hello World #7: 1316597088.63560796
> > >  Basic.Deliver text/plain delivery-tag 9: Hello World #8: 1316597089.63728094
> > > Basic.Deliver text/plain delivery-tag 10: Hello World #9: 1316597090.63895893
> >  
> > >  demo_send:
> > > INFO:pika:Connecting to 127.0.0.1:5672 (http://127.0.0.1:5672)
> > > demo_send: Connected to RabbitMQ
> > > demo_send: Received our Channel
> > > demo_send: Queue Declared
> > > demo_send: Sent Hello World #0: 1316597081.62437701
> > >  demo_send: Sent Hello World #1: 1316597082.62570310
> > > demo_send: Sent Hello World #2: 1316597083.62713790
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 500 bytes and an estimated 10 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > demo_send: Sent Hello World #3: 1316597084.62860394
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 521 bytes and an estimated 11 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 582 bytes and an estimated 12 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > >  ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 625 bytes and an estimated 13 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > demo_send: Sent Hello World #4: 1316597085.63100100
> > >  ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 646 bytes and an estimated 14 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 707 bytes and an estimated 15 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 750 bytes and an estimated 16 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > >  demo_send: Sent Hello World #5: 1316597086.63265109
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 771 bytes and an estimated 17 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > >  ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 832 bytes and an estimated 18 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 875 bytes and an estimated 19 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > demo_send: Sent Hello World #6: 1316597087.63385701
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 896 bytes and an estimated 20 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 957 bytes and an estimated 21 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > >  ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 1000 bytes and an estimated 22 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > demo_send: Sent Hello World #7: 1316597088.63560796
> > >  ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 1021 bytes and an estimated 23 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 1082 bytes and an estimated 24 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 1125 bytes and an estimated 25 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > >  demo_send: Sent Hello World #8: 1316597089.63728094
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 1146 bytes and an estimated 26 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > >  ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 1207 bytes and an estimated 27 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 1250 bytes and an estimated 28 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > demo_send: Sent Hello World #9: 1316597090.63895893
> > > demo_send: Closing
> > > INFO:pika:Closing connection: 200 - Normal shutdown
> > > ../pika/connection.py:756: UserWarning: Pika: Write buffer exceeded warning threshold at 1284 bytes and an estimated 29 frames behind
> > >  warn(message % (self.outbound_buffer.size, est_frames_behind))
> > > INFO:pika:Disconnected from RabbitMQ at 127.0.0.1:5672 (http://127.0.0.1:5672)
>  
> My question is : why all 10 messages arrive in one shot ?  
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com (mailto:rabbitmq-discuss at lists.rabbitmq.com)
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110921/e1b1b785/attachment.htm>


More information about the rabbitmq-discuss mailing list