Adam Chase wrote:
If I have implemented received and I call messageFlush(sync=true) in
my main thread, received will either complete before messageFlush
completes with a message from that subscription, or I will not get any
more messages from that subscription until I add credit again, right?

Once a synchronous messageFlush() returns, all available messages for that subscription (up to the defined credit limit) will have been delivered to the client and will be on the dispatch queue; the credit for the subscription will be zero and the broker will not deliver any more messages. The messages made available for dispatch may not yet have all been passed to the received() method of relevant registered listeners however[1].


[1] If you are using a LocalQueue, the messages will be on that queue at this point.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to