From 9daa18a5bd6b9e566bff8c1e04edca41d06618fc Mon Sep 17 00:00:00 2001 From: clvacher Date: Wed, 6 Sep 2023 11:31:42 +0200 Subject: [PATCH] Switch to abstract implementation of starter (#86) Co-authored-by: FP17639 --- README.md | 6 +++--- kstreamplify-core-test/pom.xml | 4 ++-- kstreamplify-core/pom.xml | 2 +- .../kstreamplify/initializer/KafkaStreamsStarter.java | 8 ++++---- kstreamplify-spring-boot/pom.xml | 4 ++-- pom.xml | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index eb5a2b20..9dd7a980 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ For instance, you can start by creating a class annotated with `@Component`: ```java @Component -public class MyKafkaStreams implements KafkaStreamsStarter { +public class MyKafkaStreams extends KafkaStreamsStarter { @Override public void topology(StreamsBuilder streamsBuilder) { // Your topology here @@ -151,7 +151,7 @@ To do this, the first step is to override the `dlqTopic` method and return the n ```java @Component -public class MyKafkaStreams implements KafkaStreamsStarter { +public class MyKafkaStreams extends KafkaStreamsStarter { @Override public void topology(StreamsBuilder streamsBuilder) { //... } @@ -172,7 +172,7 @@ Here is a complete example of how to do this: ```java @Component -public class MyKafkaStreams implements KafkaStreamsStarter { +public class MyKafkaStreams extends KafkaStreamsStarter { @Override public void topology(StreamsBuilder streamsBuilder) { KStream myStream = streamsBuilder diff --git a/kstreamplify-core-test/pom.xml b/kstreamplify-core-test/pom.xml index d34ddb26..5810895b 100644 --- a/kstreamplify-core-test/pom.xml +++ b/kstreamplify-core-test/pom.xml @@ -5,7 +5,7 @@ kstreamplify com.michelin - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT 4.0.0 @@ -15,7 +15,7 @@ com.michelin kstreamplify-core - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT diff --git a/kstreamplify-core/pom.xml b/kstreamplify-core/pom.xml index 7b9e44c1..da09e5ea 100644 --- a/kstreamplify-core/pom.xml +++ b/kstreamplify-core/pom.xml @@ -5,7 +5,7 @@ kstreamplify com.michelin - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT 4.0.0 diff --git a/kstreamplify-core/src/main/java/com/michelin/kstreamplify/initializer/KafkaStreamsStarter.java b/kstreamplify-core/src/main/java/com/michelin/kstreamplify/initializer/KafkaStreamsStarter.java index 964575a2..c70a35fb 100644 --- a/kstreamplify-core/src/main/java/com/michelin/kstreamplify/initializer/KafkaStreamsStarter.java +++ b/kstreamplify-core/src/main/java/com/michelin/kstreamplify/initializer/KafkaStreamsStarter.java @@ -8,12 +8,12 @@ /** * The Kafka Streams starter interface */ -public interface KafkaStreamsStarter { +public abstract class KafkaStreamsStarter { /** * Define the topology of the Kafka Streams * @param streamsBuilder The streams builder */ - void topology(StreamsBuilder streamsBuilder); + public abstract void topology(StreamsBuilder streamsBuilder); /** *

Define the dead letter queue (DLQ) topic

@@ -21,11 +21,11 @@ public interface KafkaStreamsStarter { * * @return The dead letter queue (DLQ) topic */ - String dlqTopic(); + public abstract String dlqTopic(); /** * Define runnable code after the Kafka Streams startup * @param kafkaStreams The Kafka Streams instance */ - default void onStart(KafkaStreams kafkaStreams) { } + public void onStart(KafkaStreams kafkaStreams) { } } diff --git a/kstreamplify-spring-boot/pom.xml b/kstreamplify-spring-boot/pom.xml index 0dff5c01..1d3b1542 100644 --- a/kstreamplify-spring-boot/pom.xml +++ b/kstreamplify-spring-boot/pom.xml @@ -5,7 +5,7 @@ kstreamplify com.michelin - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT 4.0.0 @@ -34,7 +34,7 @@ com.michelin kstreamplify-core - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index c8fcba5c..41fe3e30 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.michelin kstreamplify - 0.1.0-SNAPSHOT + 0.1.1-SNAPSHOT kstreamplify Kstreamplify is a Java library that brings new features on top of Kafka Streams. https://github.com/michelin/kstreamplify