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 TypeMethodDescriptionvoidclean()Clean up your Streams app by resetting the app and deleting the output topics and consumer group.voidclose()static StreamsCleanUpRunnercreate(@NonNull org.apache.kafka.streams.Topology topology, @NonNull org.apache.kafka.streams.StreamsConfig streamsConfig) Create a newStreamsCleanUpRunnerwith defaultStreamsCleanUpConfigurationstatic StreamsCleanUpRunnercreate(@NonNull org.apache.kafka.streams.Topology topology, @NonNull org.apache.kafka.streams.StreamsConfig streamsConfig, @NonNull StreamsCleanUpConfiguration configuration) Create a newStreamsCleanUpRunnervoidreset()Clean up your Streams app by resetting all state stores, consumer group offsets, and internal topics, deleting local state.static voidrunResetter(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 newStreamsCleanUpRunnerwith 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCleanUpRunner
-
clean
public void clean()Clean up your Streams app by resetting the app and deleting the output topics and consumer group.- Specified by:
cleanin 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.
-