gnodet commented on code in PR #25164:
URL: https://github.com/apache/camel/pull/25164#discussion_r3663271666
##########
components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubConsumer.java:
##########
@@ -101,6 +103,8 @@ protected void doStart() throws Exception {
}
executor = endpoint.createExecutor(this);
+ taskExecutor = endpoint.getCamelContext().getExecutorServiceManager()
Review Comment:
Good observation. The single-thread executor does serialize backoff delays
across concurrent subscribers. However, this is a single-iteration delay task
(maxIterations=1) used only as a timed pause before retry — it completes almost
instantly once the initial delay expires. With a 10-second reconnect delay,
even if multiple subscribers fail simultaneously, the serialization overhead is
negligible compared to the delay itself.
That said, if this becomes a concern in practice (e.g. very high concurrency
with frequent failures), the executor pool size could be bumped. For now,
keeping it single-threaded matches the pattern used by the other components in
this PR.
##########
components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsConsumer.java:
##########
@@ -107,12 +114,15 @@ public void run() {
fromDate = new Date();
}
- BlockingTask task = Tasks.foregroundTask()
- .withBudget(Budgets.iterationBudget()
-
.withMaxIterations(IterationBoundedBudget.UNLIMITED_ITERATIONS)
+ BlockingTask task = Tasks.backgroundTask()
+ .withBudget(Budgets.iterationTimeBudget()
+ .withMaxIterations(Integer.MAX_VALUE)
Review Comment:
Good catch — removed the redundant `withMaxIterations(Integer.MAX_VALUE)`
and added a comment noting the default. Fixed in the next push.
--
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]