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 Under Discussion
Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]
...
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
When suppressing record updates in a KTable, an internal changelog topic is created.
Currently the streams DSL does not provide a way to configure this topic.
Public Interfaces
...
The configuration for this topic cannot be set using the Streams DSL, instead a user has to run an external tool to override the defaults.
Other parts of the Streams API that create internal topics do allow for a user to set their configuration. When aggregating a stream, for example, an instance of Materialized is passed to the aggregate method which holds a topicConfig of type Map<String, String>
Public Interfaces
We add two methods to to Suppressed.BufferConfig .
withLogginEnabled
: (default) enables logging and allows for configuration of the changelog topic- withLoggingDisabled: disables logging to the changelog topic
Briefly list any new interfaces that will be introduced as part of this proposal or any existing interfaces that will be removed or changed. The purpose of this section is to concisely call out the public contract that will come along with this feature.
A public interface is any change to the following:
Binary log format
The network protocol and api behavior
Any class in the public packages under clientsConfiguration, especially client configuration
org/apache/kafka/common/serialization
org/apache/kafka/common
org/apache/kafka/common/errors
org/apache/kafka/clients/producer
org/apache/kafka/clients/consumer (eventually, once stable)
Monitoring
Command line tools and arguments
- Anything else that will likely break existing users in some way when they upgrade
Proposed Changes
...
When none of the above methods is called, the behavior will be no different from the current implementation, i.e., records will be written to a changelog topic with the default settings.
Public Interfaces
The public interface of BufferConfig
will change to include the previously mentioned methods.
Code Block | ||
---|---|---|
| ||
public interface Suppressed<K> {
interface BufferConfig<BC extends BufferConfig<BC>> {
/**
* Disable change logging for the suppressed KTable
*/
BC withLoggingDisabled();
/**
* Indicates that a changelog should be created for the suppressed KTable.
* The changelog will be created with the provided configs.
*
* @param config Configs that should be applied to the changelog. Note: Any unrecognized
* configs will be ignored.
* @return itself
*/
BC withLoggingEnabled(final Map<String, String> config);
}
} |
Compatibility, Deprecation, and Migration Plan
- What impact (if any) will there be on existing users?
- If we are changing behavior how will we phase out the older behavior?
- If we need special migration tools, describe them here.
- When will we remove the existing behavior?
Rejected Alternatives
The impact on existing applications will be non-existant as this change does not remove or alter existing behavior.
Rejected Alternatives
N/AIf there are alternative ways of accomplishing the same thing, what were they? The purpose of this section is to motivate why the design is the way it is and not some other way.