Skip to content

Commit

Permalink
Switch to abstract implementation of starter (#86)
Browse files Browse the repository at this point in the history
Co-authored-by: FP17639 <[email protected]>
  • Loading branch information
clvacher and FP17639 authored Sep 6, 2023
1 parent 2a0fc75 commit 9daa18a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) { //... }
Expand All @@ -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<String, MyAvroValue> myStream = streamsBuilder
Expand Down
4 changes: 2 additions & 2 deletions kstreamplify-core-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kstreamplify</artifactId>
<groupId>com.michelin</groupId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -15,7 +15,7 @@
<dependency>
<groupId>com.michelin</groupId>
<artifactId>kstreamplify-core</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion kstreamplify-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kstreamplify</artifactId>
<groupId>com.michelin</groupId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
/**
* 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);

/**
* <p>Define the dead letter queue (DLQ) topic</p>
* <p>If you don't want to use the DLQ topic, you can return {@link org.apache.commons.lang3.StringUtils#EMPTY}</p>
*
* @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) { }
}
4 changes: 2 additions & 2 deletions kstreamplify-spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kstreamplify</artifactId>
<groupId>com.michelin</groupId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -34,7 +34,7 @@
<dependency>
<groupId>com.michelin</groupId>
<artifactId>kstreamplify-core</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.michelin</groupId>
<artifactId>kstreamplify</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.1-SNAPSHOT</version>
<name>kstreamplify</name>
<description>Kstreamplify is a Java library that brings new features on top of Kafka Streams.</description>
<url>https://github.com/michelin/kstreamplify</url>
Expand Down

0 comments on commit 9daa18a

Please sign in to comment.