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 2020/10/08 05:20:02 UTC

[camel] branch master updated: CAMEL-15558 pollEnrich timeout issue (#4389)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 95e18d4  CAMEL-15558 pollEnrich timeout issue (#4389)
95e18d4 is described below

commit 95e18d4b3cd546a3c6d6c4cc03ad3bec27e121a9
Author: Chandrakant Hardahe <ch...@gmail.com>
AuthorDate: Thu Oct 8 10:49:46 2020 +0530

    CAMEL-15558 pollEnrich timeout issue (#4389)
    
    Co-authored-by: Chandrakant Hardahe <ch...@chardahe.pnq.csb>
---
 .../org/apache/camel/component/file/GenericFilePollingConsumer.java   | 2 +-
 .../src/main/java/org/apache/camel/support/ScheduledPollEndpoint.java | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFilePollingConsumer.java b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFilePollingConsumer.java
index d76a7d6..6a4f1ff 100644
--- a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFilePollingConsumer.java
+++ b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFilePollingConsumer.java
@@ -33,7 +33,7 @@ public class GenericFilePollingConsumer extends EventDrivenPollingConsumer {
 
     public GenericFilePollingConsumer(GenericFileEndpoint endpoint) throws Exception {
         super(endpoint);
-        this.delay = endpoint.getDelay();
+        this.delay = endpoint.getDefaultDelay();
     }
 
     @Override
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/ScheduledPollEndpoint.java b/core/camel-support/src/main/java/org/apache/camel/support/ScheduledPollEndpoint.java
index df27ed5..f763947 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/ScheduledPollEndpoint.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/ScheduledPollEndpoint.java
@@ -210,6 +210,10 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
         }
     }
 
+    public long getDefaultDelay() {
+        return (getDelay() == -1) ? DEFAULT_DELAY : getDelay();
+    }
+
     @Override
     protected void doStart() throws Exception {
         super.doStart();