Current state: Adopted
Discussion thread:
JIRA: KAFKA-12313
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
KIP-659 introduced a config windowSize to TimeWindowedDeserializer which discourages the setting of windowSize to Long.MAX_VALUE as the default value. However, there is still a possibility of setting the config only for innerClassSerde or only for windowSize. This KIP aims at standardising the way the serialisers and deserializer object can be created for the usage in console consumer, plain consumer and via the DSL.
Here are the changes being proposed in the KIP:
Windowed Serde Type | Client Type | Constructor Invoked | Proposed Change | |
---|---|---|---|---|
1 | TimeWindowedDeserializer | Console Consumer | Default constructor | Ensure both windowSize and Serde class configs are set. Throw error if not. |
Plain Consumer | Default OR Parameterised | Ok to use either as long as the configs supplied don't conflict. | ||
Kafka Streams | Parameterised | User supplies parameters by constructing a TimeWindowedSerde object. No change | ||
2 | TimeWindowedSerializer | Console Producer | Default constructor | Ensure Serde class config is set. Throw error if not. |
Plain Producer | Default OR Parameterised | Ok to use either as long as the configs supplied don't conflict. | ||
Kafka Streams | Parameterised | User supplies parameters by constructing a TimeWindowedSerde object. No change | ||
3 | SessionWindowedDeserializer | Console consumer | Default constructor | Ensure Serde class config is set. Throw error if not. |
Plain consumer | Default OR Parameterised | Ok to use either as long as the configs supplied don't conflict. | ||
Kafka Streams | Parameterised | User supplies parameters by constructing a SessionWindowedSerde object. No change | ||
4 | SessionWindowedSerializer | Console Producer | Default constructor | Ensure Serde class config is set. Throw error if not. |
Plain Producer | Default OR Parameterised | Ok to use either as long as the configs supplied don't conflict. | ||
Kafka Streams | Parameterised | User supplies parameters by constructing a SessionWindowedSerde object. No change |
public static final String WINDOWED_INNER_CLASS_SERDE = "windowed.inner.class.serde"; private static final String WINDOWED_INNER_CLASS_SERDE_DOC = " Serde for the inner class of a windowed record. Must implement the " + "<code>org.apache.kafka.common.serialization.Serde</code> interface. Note that setting this config in KafkaStreams application would result " + "in an error as it is meant to be used only from Plain consumer client."; @Deprecated public static final String DEFAULT_WINDOWED_KEY_SERDE_INNER_CLASS = "default.windowed.key.serde.inner"; @Deprecated public static final String DEFAULT_WINDOWED_VALUE_SERDE_INNER_CLASS = "default.windowed.value.serde.inner"; |
This KIP deprecates following 2 configs in StreamConfig : default.windowed.key.serde.inner and default.windowed.value.serde.inner
N/A