You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/12/07 10:09:48 UTC
(camel) 10/15: CAMEL-20189: camel-jooq: Force marking the consumer ready sooner, in case processing exchanges takes too long, causing readiness check to timeout and fail.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch ready
in repository https://gitbox.apache.org/repos/asf/camel.git
commit cb0e562640fc8ee6a96efdf0b5d8b3acbe28dff1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Dec 7 10:50:20 2023 +0100
CAMEL-20189: camel-jooq: Force marking the consumer ready sooner, in case processing exchanges takes too long, causing readiness check to timeout and fail.
---
.../src/main/java/org/apache/camel/component/jooq/JooqConsumer.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/components/camel-jooq/src/main/java/org/apache/camel/component/jooq/JooqConsumer.java b/components/camel-jooq/src/main/java/org/apache/camel/component/jooq/JooqConsumer.java
index 82e7a59f376..d1f8e8cb429 100644
--- a/components/camel-jooq/src/main/java/org/apache/camel/component/jooq/JooqConsumer.java
+++ b/components/camel-jooq/src/main/java/org/apache/camel/component/jooq/JooqConsumer.java
@@ -60,7 +60,10 @@ public class JooqConsumer extends ScheduledBatchPollingConsumer {
Queue<DataHolder> answer = new LinkedList<>();
Result<UpdatableRecord<?>> results = context.selectFrom(getTable(entityType)).fetch();
- for (UpdatableRecord result : results) {
+ // okay we have some response from jooq so lets mark the consumer as ready
+ forceConsumerAsReady();
+
+ for (UpdatableRecord<?> result : results) {
DataHolder holder = new DataHolder();
holder.exchange = createExchange(result);
answer.add(holder);