davsclaus opened a new pull request, #27635: URL: https://github.com/apache/camel/pull/27635
[CAMEL-25502](https://issues.apache.org/jira/browse/CAMEL-25502) - follow-up to #27634. A `seda` or `disruptor` producer waiting for the reply (InOut, or `waitForTaskToComplete`) when its route or the CamelContext is stopped has its wait interrupted by the forced stop. It then failed the exchange with an **`ExchangeTimedOutException`**, although the timeout had not passed (measured: after ~1 s of a 30 s timeout), or with the bare `InterruptedException` when there is no timeout. So the cut-off was logged as a full ERROR and recorded in the error registry, which #27634 avoids for the other cut-offs. **Changes** - `ExchangeHelper.isRouteStopping(exchange)` (camel-support): the CamelContext is stopping, or the consumer of the route the exchange came from is being suspended or stopped (a route stop, a reload). - `SedaProducer` and `DisruptorProducer`: an interrupted reply wait sets a `RouteStoppingException` (with the `InterruptedException` as cause) when the route is stopping, and the `InterruptedException` otherwise - an interruption is no longer reported as a timeout. - `SedaProducer`: interrupted while adding to a full queue (`blockWhenFull`) during a stop sets a `RouteStoppingException` (was a plain `RejectedExecutionException`). - The disruptor's blocking publish to a full ring buffer parks and is not interrupted, so nothing to change there. - 4.23 upgrade guide. Tests: - `SedaReplyRouteStopTest` (camel-core) and `DisruptorReplyRouteStopTest`: the forced stop of the calling route sets a `RouteStoppingException`; both fail without the change (`ExchangeTimedOutException`). - seda tests in camel-core (140) and camel-disruptor (117) green. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
