You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Status

Current stateUnder Discussion

Discussion thread: here 

JIRA: KAFKA-6520 

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

Motivation

When a Kafka Streams application is started, and then is unable to connect (docker daemon for instance is killed), then the user does not have an easy way of identifying the current state of Kafka Streams (i.e. does not know that its DISCONNECTED). For users who wish to know the status of their application, they would have to use alternative means of performing a health check. This KIP works to resolve this issue by adding a DISCONNECTED state to KafkaStreams#state().

Public Interfaces

In Kafka Streams, State.DISCONNECTED  will be added. When something happens unexpectedly which causes the connection to vanish, the Kafka Streams application will return State.DISCONNECTED. Please note that the difference between DISCONNECTED  and DEAD  is that KafkaStreams, when it is in its dead state, is no longer running. While in the DISCONNECTED  case, it would still be alive, but could not connect to broker.

This would also mean that a new method would be added to KafkaConsumer to allow the StreamThread to query the health of the connection.

KafkaConsumer#isConnected()
/**
 *	@return whether or not the connection is alive
 */
public boolean isConnected();


Proposed Changes

We would query individual StreamThreads for their individual status and update the state accordingly. 

Compatibility, Deprecation, and Migration Plan

This would not have any compatibility issues with previous versions. Changers are internalized and since the version of messages are not a concern, no upgrade path should be necessary. 


  • No labels