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/08/08 08:42:55 UTC

[camel-examples] branch main updated: CAMEL-18356: consolidated the Kafka resume strategies

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-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new da612e65 CAMEL-18356: consolidated the Kafka resume strategies
da612e65 is described below

commit da612e6563b6decff18625ad190f8454e75b9232
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Aug 5 16:31:31 2022 +0200

    CAMEL-18356: consolidated the Kafka resume strategies
---
 .../resume/fileset/clusterized/main/ClusterizedListener.java      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/resume-api/resume-api-fileset-clusterized/src/main/java/org/apache/camel/example/resume/fileset/clusterized/main/ClusterizedListener.java b/examples/resume-api/resume-api-fileset-clusterized/src/main/java/org/apache/camel/example/resume/fileset/clusterized/main/ClusterizedListener.java
index afee1903..5d113d90 100644
--- a/examples/resume-api/resume-api-fileset-clusterized/src/main/java/org/apache/camel/example/resume/fileset/clusterized/main/ClusterizedListener.java
+++ b/examples/resume-api/resume-api-fileset-clusterized/src/main/java/org/apache/camel/example/resume/fileset/clusterized/main/ClusterizedListener.java
@@ -24,7 +24,7 @@ import org.apache.camel.main.BaseMainSupport;
 import org.apache.camel.main.MainListener;
 import org.apache.camel.processor.resume.kafka.KafkaResumeStrategyConfiguration;
 import org.apache.camel.processor.resume.kafka.KafkaResumeStrategyConfigurationBuilder;
-import org.apache.camel.processor.resume.kafka.MultiNodeKafkaResumeStrategy;
+import org.apache.camel.processor.resume.kafka.SingleNodeKafkaResumeStrategy;
 import org.apache.camel.resume.Resumable;
 import org.apache.camel.resume.ResumeStrategy;
 import org.slf4j.Logger;
@@ -55,7 +55,7 @@ class ClusterizedListener implements MainListener {
             main.getCamelContext().addService(clusterService);
 
             LOG.trace("Creating the strategy");
-            MultiNodeKafkaResumeStrategy<Resumable> resumeStrategy = newResumeStrategy();
+            SingleNodeKafkaResumeStrategy<Resumable> resumeStrategy = newResumeStrategy();
             main.getCamelContext().getRegistry().bind(ResumeStrategy.DEFAULT_NAME, resumeStrategy);
 
             LOG.trace("Creating the route");
@@ -93,7 +93,7 @@ class ClusterizedListener implements MainListener {
         System.exit(0);
     }
 
-    private static MultiNodeKafkaResumeStrategy<Resumable> newResumeStrategy() {
+    private static SingleNodeKafkaResumeStrategy<Resumable> newResumeStrategy() {
         String bootStrapAddress = System.getProperty("bootstrap.address", "localhost:9092");
         String kafkaTopic = System.getProperty("resume.type.kafka.topic", "offsets");
 
@@ -103,6 +103,6 @@ class ClusterizedListener implements MainListener {
                         .withTopic(kafkaTopic)
                         .build();
 
-        return new MultiNodeKafkaResumeStrategy(resumeStrategyConfiguration);
+        return new SingleNodeKafkaResumeStrategy<>(resumeStrategyConfiguration);
     }
 }