DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
| Table of Contents |
|---|
This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.
Status
Current state: "Under DiscussionAccepted"
Discussion thread: here
JIRA: here
...
Thus, we should consider to deprecate the two existing configs names and add them back w/o the `default.` prefix.
Public Interfaces
Target release 4.0
Changes to org.apache.kafka.streams.StreamsConfig
...
- deserialization.exception.handler
- production.exception.handler
3. Adding new public method to get the new config for deserialization exception handler deserializationExceptionHandler()
4. Adding new public method to get the new config for production exception handler productionExceptionHandler()
5. Marking defaultDeserializationExceptionHandler() as deprecated
Proposed Changes
As such there are no functional changes at all. The main changes look like below.
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
@Deprecated
public static final String DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG = "default.deserialization.exception.handler";
@Deprecated
public public static final String DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_DOC = "Exception handling class that implements the <code>org.apache.kafka.streams.errors.DeserializationExceptionHandler</code> interface.";
/** {@code default.production.exception.handler} */
@SuppressWarnings("WeakerAccess")
@Deprecated
public static final String DEFAULT_PRODUCTION_EXCEPTION_HANDLER_CLASS_CONFIG = "default.production.exception.handler";
private static final String PRODUCTIONDESERIALIZATION_EXCEPTION_HANDLER_CLASS_DOC = "Exception handling class that implements the <code>org.apache.kafka.streams.errors.ProductionExceptionHandler<DeserializationExceptionHandler</code> interface.";
/** {@code default.production.exception.handler} */
@SuppressWarnings("WeakerAccess")
public static final String DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG = "deserialization.exception.handler";
/** {@code default.production.exception.handler} */
@SuppressWarnings("WeakerAccess")
public static final String PRODUCTION_EXCEPTION_HANDLER_CLASS_CONFIG = "production.exception.handler"; |
...
- Deprecate the below two configs in org.apache.kafka.streams.StreamsConfig
- default.deserialization.exception.handler
- default.production.exception.handler
- and deprecate DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_DOC
- Configs to be added to org.apache.kafka.streams.StreamsConfig
- deserialization.exception.handler
- production.exception.handler
- DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_DOC to and add DESERIALIZATION_EXCEPTION_HANDLER_CLASS_DOC
- DEFAULT_PRODUCTION_EXCEPTION_HANDLER_CLASS_DOC to PRODUCTION_EXCEPTION_HANDLER_CLASS_DOC
- Update all the relevant dependency classes, so that both old and new configs are supported
- Update ConfigDef in TopologyConfig and code blocks like isTopologyOverride(DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG, topologyOverrides)) with new configs, so that code behaves the same for both the old and new configs
- RecordDeserializer update handleDeserializationFailure method
- Mark the tests depending on old configs as deprecated and introduce new tests in the below
- InternalTopologyBuilderTest
- StreamTaskTest
- StreamThreadTest
- If user sets both old and new configs, new config should be considered. And always look for new config, and if it's not available, fallback to old one.
Compatibility, Deprecation, and Migration Plan
The below configs in StreamsConfig will be marked for deprecation, and new configs will be introduced, and in later further releases, they could be removed
- default.deserialization.exception.handler
- default.production.exception.handler
- DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_DOC
Basically we have to make sure that after deprecation, the functionality for StreamsConfig, TopologyConfig and RecordDeserializer remains the same and should behave exactly same for old and new configs.
But if user sets both old and new configs, like in other patterns, new config should be considered. And always look for new config, and if it's not available, fallback to old one.
Test Plan
Describe in few sentences how the KIP will be tested. We are mostly interested in system tests (since unit-tests are specific to implementation details). How will we know that the implementation works as expected? How will we know nothing broke?
...