davsclaus commented on code in PR #28261:
URL: https://github.com/apache/camel/pull/28261#discussion_r4344924734
##########
components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaConsumer.java:
##########
@@ -71,14 +71,17 @@ protected void doStart() throws Exception {
@Override
protected void doStop() throws Exception {
+ if (executor != null) {
+ // wait for the consumer threads to end their current poll (at
most pollTimeout) and route what it returned:
+ // a poll takes the item from the queue, so an item polled after
the processor is stopped is lost
+
endpoint.getCamelContext().getExecutorServiceManager().shutdownGraceful(executor);
Review Comment:
Not blocking: this wait is bounded by `pollTimeout` only while `pollTimeout
< shutdownAwaitTermination`. Above that, the forced shutdown interrupts the
poll, and with Hazelcast 5.4 that still loses the item (see the review
summary). Capping the single poll at 1 s in `run()`, as #28258 does for the
queue consumer, would keep this comment true for any `pollTimeout`.
--
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]