This is an automated email from the ASF dual-hosted git repository. apupier pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 9d8608ab4aed6702baa99f35836b62b78219ec36 Author: smjain <[email protected]> AuthorDate: Thu Sep 24 18:02:30 2026 +0530 CAMEL-24951: camel-seda - Document the side effects of SedaConsumer.getPendingExchangesSize Co-Authored-By: Claude Opus 5.5 <[email protected]> --- .../org/apache/camel/component/seda/SedaConsumer.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaConsumer.java b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaConsumer.java index 28ef5864bdb0..3d0730be370e 100644 --- a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaConsumer.java +++ b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaConsumer.java @@ -84,6 +84,21 @@ public class SedaConsumer extends DefaultConsumer implements Runnable, ShutdownA return true; } + /** + * Returns the number of pending exchanges the shutdown strategy must wait for before this consumer can be stopped. + * <p/> + * Note that this method has side effects and is not only a getter: + * <ul> + * <li>if {@code purgeWhenStopping} is enabled, the queue is purged first, so there are no pending exchanges to wait + * for.</li> + * <li>if this consumer is suspending or suspended, {@code 0} is returned: a suspended consumer does not poll the + * queue, so waiting for its pending exchanges would only wait for the shutdown timeout. The pending exchanges are + * kept on the queue (unless purged as above).</li> + * </ul> + * Otherwise the number of exchanges on the queue is returned. + * + * @return the number of pending exchanges to wait for + */ @Override public int getPendingExchangesSize() { return getPendingExchangesSize(false);
