On 08/07/2015 12:27 PM, Andreas Welchlin wrote:
I asked myself if it would be a reasonable workaround to
1.) set sync to false
2.) always call getUnsettled() before sending a message out.
So I could maybe determine that there is a problem before send() blocks
forever?
Yes, you can send asynchronously and test that the getUnsettled() count
is less than half the senders capacity, and that way you know that the
next call will not block.
Of course when sending asynchronously, the return of the send() call
doesn't mean that the message reached the broker yet. However that will
be checked on the next send even if async and you can all call check()
or even sync(false) at any time.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]