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)

Discussion thread: here

Vote thread: hereDiscussion thread: WIP

JIRA: here

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

This situation is more critical given the recent increase in default `session.timeout` to 45s, since that's a long time to go without noticing that a consumer has indeed permanently left the group.

Public Interfaces

...

Code Block
languagejava
package org.apache.kafka.streams;

public class KafkaStreams implements AutoCloseable {
    public void close()  // Already exist 
    private boolean close(final long timeoutMs)  // Already exist
    public synchronized boolean close(final Duration timeout) throws IllegalArgumentException  // Already exist
    public synchronized boolean close(CloseOptions options) throws IllegalArgumentException  // *This one will be added

 	public static class CloseOptions {
		private Duration timeout = Duration.ofMillis(Long.MAX_VALUE);
    	private boolean leaveGroup = false;

 	    public CloseOptions timeout(Duration timeout) 
	    public CloseOptions leaveGroup(boolean leaveGroup)
	}
}

Proposed Changes

We introduce another form of the `KafkaStreams.close()` method that forces the member to leave the consumer group, to be used in event of actual scale down rather than a transient bounce.

...