Hi Gordon, Thanks for the answer.
I'm wondering whether there is any possibility to move the prefetch window only after a message or a number of messages are acknowledged? Best Regards, Sergey -----Original Message----- From: Gordon Sim [mailto:g...@redhat.com] Sent: Wednesday, September 19, 2012 12:19 PM To: users@qpid.apache.org Subject: Re: How does the prefetch/receiver capacity really work? On 09/19/2012 09:06 AM, Zhemzhitsky Sergey wrote: > Consider, there is a broker with a queue that contains 10 messages and > receiver with receiver capacity set to 5. > > As I understand the broker will push 5 messages to the receiver to fill in > its internal queue and internal queue of receiver will contain 5 messages and > broker will contain 5 unpushed messages too. > Then I will call Receiver::fetch(Message&,bool) without acknowledging the > message. > Does it mean that receiver’s internal queue now has a free slot, so the > broker can push another message to it, so that the receiver can be > considered to receive 6 messages in total and broker can be considered to > have 4 unpushed messages? The broker doesn't know about the free slot until the client library tells it. In AMQP 0-10, the c++ client does this via a session-completed, that includes the fetched message and thus moves the prefetch window. However to avoid excessive back and forth traffic, the c++ client will only send completions when the application has used up half the prefetch. So in your example, the client would only move the prefetch window on the broker after the application fetched 3 messages. (At that point the broker could send a further 3 messages). Its quite possible this could be fine tuned a little more, or made configurable (right now its hardcoded) if there are cases where a slightly different approach would be preferred. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org _______________________________________________________ The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia. If you need assistance please contact our Contact Center (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org