[ https://issues.apache.org/jira/browse/KAFKA-2403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14708125#comment-14708125 ]
Neha Narkhede commented on KAFKA-2403: -------------------------------------- [~hachikuji] [~ewencp] Cross posting my thoughts on this change here for more visibility: bq. On the other hand, maybe most users don't even specify the offsets manually anyway and the concern here is unwarranted since 99% of the cases are handled by commit(CommitType) and commit(CommitType, ConsumerCommitCallback) I think manual offset commit is really a very small percentage of all uses. Even though I agree that amongst that minority, fewer would have custom metadata, I'm not sure it is worth adding the extra commitWithMetadata API for. It may be ok in this case to go with public void commit(Map<TopicPartition, OffsetMetadata> offsets, CommitType commitType); > Expose offset commit metadata in new consumer > --------------------------------------------- > > Key: KAFKA-2403 > URL: https://issues.apache.org/jira/browse/KAFKA-2403 > Project: Kafka > Issue Type: Sub-task > Reporter: Jason Gustafson > Assignee: Jason Gustafson > Priority: Minor > > The offset commit protocol supports the ability to add user metadata to > commits, but this is not yet exposed in the new consumer API. The > straightforward way to add it is to create a container for the offset and > metadata and adjust the KafkaConsumer API accordingly. > {code} > OffsetMetadata { > long offset; > String metadata; > } > KafkaConsumer { > commit(Map<TopicPartition, OffsetMetadata>) > OffsetMetadata committed(TopicPartition) > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)