You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/03/01 18:24:22 UTC

[camel] 16/16: CAMEL-15562: simplify the resumable processor lifecycle

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

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

commit cfe69f612a76f6ae9222209c045eed940fd276c1
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Mar 1 13:37:19 2022 +0100

    CAMEL-15562: simplify the resumable processor lifecycle
---
 .../java/org/apache/camel/processor/resume/ResumableProcessor.java    | 4 +++-
 .../src/main/java/org/apache/camel/reifier/ResumableReifier.java      | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/resume/ResumableProcessor.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/resume/ResumableProcessor.java
index ebc4d78..a31196c 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/resume/ResumableProcessor.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/resume/ResumableProcessor.java
@@ -80,7 +80,8 @@ public class ResumableProcessor extends AsyncProcessorSupport
 
     @Override
     protected void doStart() throws Exception {
-        LOG.debug("Enabling the resumable strategy of type: {}", resumeStrategy.getClass().getSimpleName());
+        LOG.info("Starting the resumable strategy: {}", resumeStrategy.getClass().getSimpleName());
+        resumeStrategy.start();
 
         super.doStart();
     }
@@ -150,4 +151,5 @@ public class ResumableProcessor extends AsyncProcessorSupport
     public boolean hasNext() {
         return processor != null;
     }
+
 }
diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ResumableReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ResumableReifier.java
index 9fcb1a5..1d19634 100644
--- a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ResumableReifier.java
+++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ResumableReifier.java
@@ -37,7 +37,6 @@ public class ResumableReifier extends ProcessorReifier<ResumableDefinition> {
 
         ResumeStrategy resumeStrategy = resolveResumeStrategy();
         ObjectHelper.notNull(resumeStrategy, "resumeStrategy", definition);
-        resumeStrategy.start();
         route.setResumeStrategy(resumeStrategy);
 
         return new ResumableProcessor(resumeStrategy, childProcessor);