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

Compare with Current View Page History

« Previous Version 4 Next »

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 stateUnder Discussion

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]

JIRA: KAFKA-10044 - Getting issue details... STATUS

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

Motivation

Both of ConsumerConfig#addDeserializerToConfig(Properties, Deserializer, Deserializer) and ProducerConfig#addSerializerToConfig(Properties, Serializer, Serializer) are useless after https://github.com/apache/kafka/pull/8605.

Public Interfaces

No new interface

Proposed Changes

Deprecate following methods.

ProducerConfig
public static Properties addSerializerToConfig(Properties properties,
                                                   Serializer<?> keySerializer,
                                                   Serializer<?> valueSerializer)

public static Map<String, Object> addSerializerToConfig(Map<String, Object> configs,
                                                   Serializer<?> keySerializer,
                                                   Serializer<?> valueSerializer)


ConsumerConfig
public static Properties addDeserializerToConfig(Properties properties,
                                                     Deserializer<?> keyDeserializer,
                                                     Deserializer<?> valueDeserializer)

public static Map<String, Object> addDeserializerToConfig(Map<String, Object> configs,
                                                     Deserializer<?> keyDeserializer,
                                                     Deserializer<?> valueDeserializer)


add following package-private methods.

ProducerConfig
static Map<String, Object> appendSerializerToConfig(Map<String, Object> configs,
                                                   Serializer<?> keySerializer,
                                                   Serializer<?> valueSerializer)
ConsumerConfig
static Map<String, Object> appendDeserializerToConfig(Map<String, Object> configs,
                                                   Deserializer<?> keyDeserializer,
                                                   Deserializer<?> valueDeserializer)

Compatibility, Deprecation, and Migration Plan

ProducerConfig#addSerializerToConfig(Map<String, Object>...) is deprecated so as to remove it from public scope. A package-private replacement `appendSerializerToConfig` will be added and then used by KafkaProducer internally.

ConsumerConfig#addDeserializerToConfig(Map<String, Object>...) is deprecated so as to remove it from public scope. A package-private replacement `appendDeserializerToConfig` will be added and then used by KafkaConsumer internally.

Rejected Alternatives

N/A


  • No labels