Versions Compared

Key

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

...

If configuration INTERNAL_TOPIC_SETUP is set to AUTOMATIC_SETUP, the internal topics will be set up during a rebalance. If the internal topics do not exist during a rebalance, they will be createdsetup. That corresponds to the current behavior of Kafka Streams. Users can also call KafkaStreams#init() to setup the internal topics when INTERNAL_TOPIC_SETUP is set to AUTOMATIC_SETUP, but the call is not necessary since the internal topics would be created anyways during the next rebalance.

If configuration INTERNAL_TOPIC_SETUP is set to MANUAL_SETUP, the internal topics will not be set up during a rebalance but users need to call KafkaStreams#init() to setup the internal topics. If the internal topics do not exist during a rebalance because KafkaStreams#init() has not been called or one or more internal topics have been deleted, a MissingInternalTopicException is thrown in each Kafka Streams client.

Method If method KafkaStreams#init() sets up the broker-side state for a Kafka Streams application. If the method:

  • does not find all any internal topics topic for the Kafka Streams client on the brokers, it will setup all internal topics
  • finds all internal topics for the Kafka Streams client on the brokers, it will not setup any internal topics
  • finds some of the internal topics it will
    • throw MissingInternalTopicsException if KafkaStreams#init() without any parameters is called without any parameters or the parameters specify to throw for the missing internal topics
    • setup the missing internal topics if the parameters passed to KafkaStreams#init() specify so

For example, if a changelog topic is missing and init(initParameters.enableSetupChangelogTopicsIfIncomplete()) is called, the missing changelog topic will be setup. However, on a missing repartition topic the same call will throw. If KafkaStreams#init() is called, the call will throw if an internal topic is missing and other internal topics are not missing.

In addition to setup internal topics, KafkaStreams#init() will make all checks that are currently done during a rebalance including checks for source and sink topics.

...