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

Compare with Current View Page History

« Previous Version 2 Next »

Status

Current state: "Under Discussion"

Discussion thread: see Jira issue

JIRA: KAFKA-13864

Motivation

To allow implementing Spring managed interceptors for producers and consumers,

https://github.com/spring-projects/spring-kafka/issues/2244

  • a new constructor should be added in KafkaProducer
  • the visibility of an existing constructor in KafkaConsumer should move from default to public

Kafka streams is not concerned by this issue as the KafkaStreams object is already exposing a constructor receiving a StreamsConfig object.

Public Interfaces

KafkaProducer

KafkaConsumer

Proposed Changes

Create a new constructor in KafkaProducer

public KafkaProducer(ProducerConfig config, Serializer<K> keySerializer, Serializer<V> valueSerializer)

and increase the visibility of an existing constructor in KafkaConsumer

public KafkaConsumer(ConsumerConfig config, Deserializer<K> keyDeserializer, Deserializer<V> valueDeserializer)

Compatibility, Deprecation, and Migration Plan

No compatibility issue and no migration plan needed because this KIP only creates a constructor and increase the visibility of an existing one.

Rejected Alternatives

/


  • No labels