On 02/02/15 16:21, Gordon Sim wrote:
On 02/02/2015 03:13 PM, Toralf Lund wrote:
The question is in the subject, really. To elaborate a bit, I'm talking
about receiving AMQP-0.10 messages via qpid::Messaging::receiver in C++.
Am I right to assume that getAvailable() only counts the messages
already in the receiver, meaning that it must have a non-0 capacity for
a meaningful output value?

Correct.
OK. Thanks.


I'm debugging an issue with an application where I've forgotten to call
setCapacity(), or failed to realise at the time that I should use that
method, if you know what I'm saying...

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?

By default it is 0, meaning that messages are never sent prior to a fetch() but only in response to an explicit fetch(). The thinking behind this choice of default is that it led to more intuitive behaviour, but it's always hard to guess what is intuitive and its certainly subjective.
Certainly.

The setup as such seems sort of intuitive to me, too, but what I didn't really get at first was the relationship between pre-fetch and methods like getAvailable() and Session::nextReceiver(). Maybe a clarification in their documentation might be useful. Although when I read it now, it seems quite obvious that it refers to pre-fetched data. ;-)

- Toralf


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



This e-mail, including any attachments and response string, may contain 
proprietary information which is confidential and may be legally privileged. It 
is for the intended recipient only. If you are not the intended recipient or 
transmission error has misdirected this e-mail, please notify the author by 
return e-mail and delete this message and any attachment immediately. If you 
are not the intended recipient you must not use, disclose, distribute, forward, 
copy, print or rely on this e-mail in any way except as permitted by the author.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to