Status

Current state: Under Discussion

Discussion thread: here 

JIRA:  

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

Motivation

Over time, certain exceptions and methods within the Kafka Streams exception handling interfaces have been deprecated in favor of newer, more comprehensive alternatives. Retaining these deprecated elements can lead to confusion, and complicates future development and maintenance. This KIP proposes the removal of these specific deprecated exceptions and methods to streamline the API and improve code clarity.

Public Interfaces

The removal will affect the public exceptions of Kafka Streams. Users who are still using the BrokerNotFoundException  class or implementing/calling these specific deprecated methods will encounter compilation errors.

Proposed Changes

This KIP proposes to remove the following deprecated Kafka Streams exception class and methods:

This change goes in two steps

Step1: mark unused BrokerNotFoundException as deprecated in 4.2 release

Step2: remove the deprecated exception and the other methods already marked deprecated in the next major release which can be 5.0

Unused Exception for Deprecation and Removal:

Deprecated Methods for Removal:

The BrokerNotFoundException class was unused since in Kafka Streams 2.8. 
The listed methods were deprecated in Kafka Streams version 3.9, with newer handle methods (that include ErrorHandlerContext) provided as replacements.

The removal of these elements will simplify the interfaces and ensure users adopt the more robust exception handling mechanisms.

Compatibility, Deprecation, and Migration Plan

Test Plan

This is a code cleanup. Existing test suite should catch any failures. Will add or update new unit tests as needed.

Rejected Alternatives

N/A