apupier commented on code in PR #26797:
URL: https://github.com/apache/camel/pull/26797#discussion_r4093314385


##########
components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaConsumer.java:
##########
@@ -91,6 +91,11 @@ public int getPendingExchangesSize() {
         if (getEndpoint().isPurgeWhenStopping()) {
             getEndpoint().purgeQueue();
         }
+        if (isSuspending() || isSuspended()) {
+            // a suspended consumer does not poll the queue, so do not wait 
for it to complete the pending exchanges
+            // (they are kept on the queue)
+            return 0;
+        }
         return getEndpoint().getQueue().size();

Review Comment:
   I feel that we should add information in the javadoc of the get method. it 
is not only "getting" things but also purging queues and the case of returning 
° when it is is in suspended or suspending case is not easy to understand apart 
from reading the source code, it should be more visible in the javadoc



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