davsclaus commented on code in PR #25164:
URL: https://github.com/apache/camel/pull/25164#discussion_r3662963918
##########
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:
Minor observation: this creates a single-thread scheduled executor shared
across all `concurrentConsumers` threads. When multiple subscribers fail
simultaneously, their backoff delays are serialized rather than independent
(unlike the prior `ForegroundTask` which slept per-thread).
In practice the impact is negligible since the delay supplier is `() ->
true` (near-instant execution), but worth noting the behavioral difference. The
same applies to `HazelcastSedaConsumer`.
##########
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:
Nit: `Integer.MAX_VALUE` is already the default for
`IterationTimeBoundedBudgetBuilder.maxIterations`, so this call could be
omitted entirely:
```suggestion
// maxIterations defaults to Integer.MAX_VALUE
(effectively unlimited)
```
Alternatively, keeping it explicit is fine for readability — just noting the
redundancy.
--
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]