Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
This is basically a follow up on CAMEL-5404.
If the "disconnect" parameter is not set on true, the same problem occurs as described in CAMEL-5404 in case of a timeout, i.e. a delayed response may be incorrectly associated with a subsequent request, which leads to disaster.
To avoid this behavior, "disconnect" could be set to "true" - however, this would close the connection also after each response successfully delivered in time. This causes unnecessary overhead when reopening connections every time.
Proposal:
if (sync) { // wait for response, consider timeout LOG.debug("Waiting for response using timeout {} millis.", timeout); boolean done = responseLatch.await(timeout, TimeUnit.MILLISECONDS); if (!done) { # NEW: Force session to be closed on timeouts closeSessionIfNeededAndAwaitCloseInHandler(session); throw new ExchangeTimedOutException(exchange, timeout); }
Maybe this behavior can also be tied to a producer-side disconnectOnNoReply parameter.
Attachments
Issue Links
- links to