I am using the java broker 0.5 and the python client. I have a queue with one publisher and (usually) three subscribers. The publisher sends messages at a fairly constant rate. The subscribers take messages in a single thread at an unlimited rate, put them in a buffer, and ack the messages immediately. If the buffer fills then they block before the ack.
Normally all the subscribers get messages at about the same rate, and the queue's message count is mostly zero. If a subscriber starts to block then the message count may rise, and when it gets to the tens of thousands I reduce the publication rate. But an odd situation appears: The blocked subscriber takes messages into its buffer as fast as it takes them out, but the other two subscribers get messages at only one third of the rate that the publisher is adding them. That first subscriber is running many times faster. If I add a fourth subscriber it gets messages at one quarter the publication rate, and the other two start getting messages at that rate too. If I kill the fourth subscriber rates return to what they were. If I kill the first subscriber then the other two start taking messages very fast, and the backlog in the queue quickly disappears. It seems as if the broker has earmarked the backlogged messages for that one subscriber, and won't deliver them to any other unless that one goes away. Could that be the case? Note that a subscriber may have at most one unacked message. I'm afraid I can't abstract any reasonable amount of code to display. I'm not sure that would help anyway. -- mARK bLOORE <[email protected]> --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
