[
https://issues.apache.org/jira/browse/KAFKA-13864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17530697#comment-17530697
]
François Rosière edited comment on KAFKA-13864 at 5/2/22 11:59 AM:
-------------------------------------------------------------------
KIP looks overkill in this specific case as we simply create a new constructor
+ increase the visibility of one existing constructor, no impact on existing
API and the usage is still the exact same. But I can create one when I will
have the right setup/accounts.
was (Author: JIRAUSER288866):
KIP looks overkill in this specific case as we simply create a new constructor
+ increase the visibility of one existing constructor, no impact on existing
API and the usage is still the exact same. But let me create it...
> Change the visibility of a KafkaProducer and KafkaConsumer constructor
> ----------------------------------------------------------------------
>
> Key: KAFKA-13864
> URL: https://issues.apache.org/jira/browse/KAFKA-13864
> Project: Kafka
> Issue Type: Improvement
> Components: clients
> Affects Versions: 3.1.0
> Reporter: François Rosière
> Assignee: lqjacklee
> Priority: Major
> Labels: needs-kip
> Attachments: interceptor_constructor_client.patch
>
>
> 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
> {code:java}
> public KafkaProducer(ProducerConfig config, Serializer<K> keySerializer,
> Serializer<V> valueSerializer){code}
> the visibility of one constructor of KafkaConsumer should also move from
> default to public.
> {code:java}
> public KafkaConsumer(ConsumerConfig config, Deserializer<K> keyDeserializer,
> Deserializer<V> valueDeserializer) {code}
> see the current implementation
> https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java#L671
> This issue is quite blocking , so, any other alternative or proposal would be
> more than welcome.
> Kafka streams is not concerned by this issue as the KafkaStreams object is
> already exposing a constructor taking a StreamsConfig object.
> Thanks for considering this issue.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)