Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not modify ProducerMessage.MetaData #1110

Merged
merged 1 commit into from
Jun 14, 2018

Conversation

the729
Copy link

@the729 the729 commented Jun 2, 2018

In SyncProducer, do not modify ProducerMessage.MetaData during the whole process of publishing the message to Kafka.
MetaData could be used in a user-defined Partitioner. The original design saves the MetaData and reuse the field as a signal channel to wait for completion of publish. It's better to add a non-exeported field for this purpose in the ProducerMessage struct.

@eapache
Copy link
Contributor

eapache commented Jun 14, 2018

Nice, thanks! I never considered that the metadata field might actually be useful during the message's lifecycle, instead of just after being returned on errors/successes.

@eapache eapache merged commit 05ded73 into IBM:master Jun 14, 2018
@the729 the729 deleted the sync_producer_metadata branch June 20, 2018 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants