qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Is getAvailable() always 0 when capacity is 0?
Date Thu, 05 Feb 2015 16:32:06 GMT
On 02/05/2015 02:28 PM, Toralf Lund wrote:
> On 02/02/15 16:21, Gordon Sim wrote:
>> The capacity controls the number of 'pre-fetched' messages, i.e.
>> messages sent by the broker (or peer) in anticipation of subsequent
>> fetch() calls.
> When exactly are message pre-fetched?

When the capacity of the receiver is set to a non-zero value, that 
number of credits are issued to the broker. Its then at the brokers 
discretion when they send messages to use up the credit (or indeed 
whether they have any messages to send). The broker cannot send more 
than the number of credits allocated though. (If the queue has 
sufficient messages, the broker will usually immediately send the full 
number of messages).

When a message is returned to the application, the library can issue one 
more credit - i.e. it slides the prefetch window forward - however it 
doesn't necessarily send this immediately to the broker, there is often 
some level of batching and it only sends it if its sending something 
anyway or if it has some level of outstanding credit.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message