Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Write public interfaces in the full signature format

...

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()
    private boolean close(final long timeoutMs)
	public synchronized boolean close(final Duration timeout) throws IllegalArgumentException
 	public synchronized boolean close(CloseOptions options) throws IllegalArgumentException

 	public static class CloseOptions {
		private Integer timeoutMs = null;
    	private boolean leaveGroup = false;

 	    public CloseOptions timeoutMs(Integer timeoutMs) 
	    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.

...