Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

Table of Contents

...

Usage

Warning

Use this tool only if the application is fully stopped:

You must use this script only if no instances of your application are running. Otherwise the application may enter an invalid state, crash, or produce incorrect results.

 

Use this tool with care and double-check its parameters:

If you provide wrong parameter values (e.g. typos in application.id) or specify parameters inconsistently (e.g. specifying the wrong input topics for the application), this tool might invalidate the application’s state or even impact other applications, consumer groups, or Kafka topics of your Kafka cluster.

Step 1 of 2: Local reset (for each application instance)

Info

This local reset must be done on each machine on which an instance of the application has been run before.

Call KafkaStreams#cleanUp() in your application code before KafkaStreams#start() to perform a local reset.

Step 2 of 2: Global reset (for the overall application)

Info

Unlike step 1 this step needs to be performed only once, and it does not matter on which machine the application reset tool is being executed.

...

Note: Intermediate topics are all user-created topics that are used both as input and as output topics within a single Kafka Streams application (e.g. topics used in through()).

What the application reset tool does

  • For any specified input topics:
    • Reset the application’s committed consumer offsets to zero for all partitions (for consumer group application.id).
  • For any specified intermediate topics:
    • Skip to the end of the topic, i.e. set the application’s committed consumer offsets for all partitions to each partition’s logSize (for consumer group application.id).
  • For any internal topics:
    • Reset the application’s committed consumer offsets to zero for all partitions (for consumer group application.id).
    • Delete the internal topic.

...