Versions Compared

Key

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

Table of Contents

Status

Current state: Under DiscussionAdopted (3.3.0): (Vote thread: here)

Discussion thread: here 

JIRA: KAFKA-13873

...

Code Block
KafkaStreams.java
	/* 
       Paused topologies will only skip over a) processing, b) punctuation, and bc) standby punctuationtasks.
	   Notably, paused topologies will still poll Kafka consumers, process standBy tasks, and commit offsets and commit offsets.
	   This method sets transient state that is not maintained or managed among instances.
	   Note that pause() can be called before start() in order to start a KafkaStreams instance in a manner where the processing 
		is paused as described, but the consumers are started up.
    */
    public void pause() 
	// Returns the state of the metadata.  The last run through the topology may still be executing.
    public boolean isPaused()
    public void resume()

...

The change is to add the above methods.  The implementation will manage internal metadata to achieve the desired results.

During task execution, only processing processing tasks (both active and standby tasks) and punctuation will be skipped.  Kafka consumers will continue to poll and potentially fill up their buffers.  Commits will continue to happen on the schedule that they would have happened.


Note

Since a pause Streams instance still continues to interact with Kafka consumers, the Streams resetter tool (kafka-streams-application-reset.sh) should not be used while an instance is paused.  


Changes to NamedTopologies / Modular Topologies.

...