Package com.bakdata.kafka.streams
Class StreamsCleanUpRunner
java.lang.Object
com.bakdata.kafka.streams.StreamsCleanUpRunner
- All Implemented Interfaces:
CleanUpRunner
,AutoCloseable
Clean up the state and artifacts of your Kafka Streams app
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clean()
Clean up your Streams app by resetting the app and deleting the output topics and consumer group.void
close()
static StreamsCleanUpRunner
create
(@NonNull org.apache.kafka.streams.Topology topology, @NonNull org.apache.kafka.streams.StreamsConfig streamsConfig) Create a newStreamsCleanUpRunner
with defaultStreamsCleanUpConfiguration
static StreamsCleanUpRunner
create
(@NonNull org.apache.kafka.streams.Topology topology, @NonNull org.apache.kafka.streams.StreamsConfig streamsConfig, @NonNull StreamsCleanUpConfiguration configuration) Create a newStreamsCleanUpRunner
void
reset()
Clean up your Streams app by resetting all state stores, consumer group offsets, and internal topics, deleting local state.static void
runResetter
(Collection<String> inputTopics, Collection<String> allTopics, StreamsConfigX streamsAppConfig) Run the Kafka Streams Reset Tool
-
Method Details
-
create
public static StreamsCleanUpRunner create(@NonNull @NonNull org.apache.kafka.streams.Topology topology, @NonNull @NonNull org.apache.kafka.streams.StreamsConfig streamsConfig) Create a newStreamsCleanUpRunner
with defaultStreamsCleanUpConfiguration
- Parameters:
topology
- topology defining the Kafka Streams appstreamsConfig
- configuration to run topology and connect to Kafka admin tools- Returns:
StreamsCleanUpRunner
-
create
public static StreamsCleanUpRunner create(@NonNull @NonNull org.apache.kafka.streams.Topology topology, @NonNull @NonNull org.apache.kafka.streams.StreamsConfig streamsConfig, @NonNull @NonNull StreamsCleanUpConfiguration configuration) Create a newStreamsCleanUpRunner
-
runResetter
public static void runResetter(Collection<String> inputTopics, Collection<String> allTopics, StreamsConfigX streamsAppConfig) Run the Kafka Streams Reset Tool- Parameters:
inputTopics
- list of input topics of the streams appallTopics
- list of all topics that exists in the Kafka clusterstreamsAppConfig
- configuration properties of the streams app
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCleanUpRunner
-
clean
public void clean()Clean up your Streams app by resetting the app and deleting the output topics and consumer group.- Specified by:
clean
in interfaceCleanUpRunner
- See Also:
-
reset
public void reset()Clean up your Streams app by resetting all state stores, consumer group offsets, and internal topics, deleting local state.
-