gnodet opened a new pull request, #21719: URL: https://github.com/apache/camel/pull/21719
## Summary Fixes the SEDA consumer hanging indefinitely during shutdown when using `virtualThreadPerTask=true` mode. Three root causes addressed: - **No timeout on `CountDownLatch.await()`** in `SedaConsumer.prepareShutdown()` — now uses the shutdown strategy's configured timeout (default 45s) to prevent indefinite hangs - **Latch count mismatch in `ThreadPerTaskSedaConsumer`** — inherited the parent's `CountDownLatch(concurrentConsumers)` but `concurrentConsumers` is a concurrency *limit* (default 0=unlimited), not a thread count. With count=0, `setupTasks()` submitted 0 coordinator tasks so messages were never consumed. Now overrides `getLatchCount()` to return 1 and `setupTasks()` to always start exactly 1 coordinator - **No wait for active tasks** — `ThreadPerTaskSedaConsumer` dispatches messages to a task executor but didn't wait for in-flight tasks during shutdown. Now overrides `prepareShutdown()` to await task executor termination Also re-enables `ThreadPerTaskSedaConsumerTest` (was `@Disabled`). All 96 SEDA tests pass. ## Test plan - [x] `ThreadPerTaskSedaConsumerTest` — 3 tests pass (was disabled, now enabled) - [x] All `Seda*Test` — 96 tests pass, no hangs - [ ] CI build passes 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
