Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to abstract implementation of starter #86

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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