allthingssecurity commented on code in PR #27636:
URL: https://github.com/apache/camel/pull/27636#discussion_r4236660136


##########
components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsConsumer.java:
##########
@@ -61,17 +75,47 @@ protected void doStart() throws Exception {
                     getEndpoint().getEndpointUri(), poolSize);
         }
 
-        this.service.attachCamelConsumer(endpoint.getStream(), this);
+        // the items left queued by a stop that timed out are routed now
+        scheduleQueuedItems();
+
+        this.subscriber = 
this.service.attachCamelConsumer(endpoint.getStream(), this);
+    }
+
+    @Override
+    protected void doSuspend() throws Exception {

Review Comment:
   Thanks, confirmed with a test and done in e308221: the consumer is now 
`ShutdownAware` (`deferShutdown` false); `getPendingExchangesSize(false)` 
switches it into a draining mode (queued items routed while suspended, 
`refill()` requests nothing) and returns queued plus in-routing items, so the 
strategy waits for them within its timeout while `direct:sub` is still running. 
`getPendingExchangesSize(true)` returns 0, so route suspend and route policies 
are unchanged.
   
   _Claude Code on behalf of allthingssecurity_



-- 
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]

Reply via email to