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:46 UTC

(camel) 08/15: CAMEL-20189: camel-jpa: 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 1f2b41493bdb83718be0ee15fdfe834a4b260d86
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Dec 7 10:43:40 2023 +0100

    CAMEL-20189: camel-jpa: 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/jpa/JpaConsumer.java      | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
index f4d9b451d64..620a44dbde7 100644
--- a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
+++ b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
@@ -119,6 +119,9 @@ public class JpaConsumer extends ScheduledBatchPollingConsumer {
                 List<?> results = toExecute.getResultList();
                 LOG.trace("Got result list from query {}", results);
 
+                // okay we have some response from jpa so lets mark the consumer as ready
+                forceConsumerAsReady();
+
                 for (Object result : results) {
                     DataHolder holder = new DataHolder();
                     holder.manager = entityManager;