[
https://issues.apache.org/jira/browse/KAFKA-19650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18017101#comment-18017101
]
Matthias J. Sax commented on KAFKA-19650:
-----------------------------------------
Not sure if adding the key to RecordMetadata would be the right thing to do. As
you already pointed out, is not really metadata.
Can you elaborate on your use case, and what you try to accomplish in more
details? It might be better to solve this issue at the KS layer?
> Add message key to org.apache.kafka.clients.producer.RecordMetadata
> -------------------------------------------------------------------
>
> Key: KAFKA-19650
> URL: https://issues.apache.org/jira/browse/KAFKA-19650
> Project: Kafka
> Issue Type: Wish
> Components: clients
> Reporter: Schubert Fernandes
> Priority: Minor
> Labels: needs-kip
>
> Although the message key is not really {_}metadata{_}, it may be useful to
> include it in the _org.apache.kafka.clients.producer.RecordMetadata_ class so
> that metdata can be tied back to a specific message.
> When using a standard Kafka producer it is easy to tie back the metadata to a
> specific message by using the callback mechanism.
> However, when using Kafka streams, the only way to access the metadata and
> log the details is to register a stream-level
> _org.apache.kafka.clients.producer.ProducerInterceptor_ instance.
> This mechanism has a drawback in that it is impossible to tie the
> RecordMetadata instance back to a particular message.
> Including the message key in the metadata would solve this problem.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)