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

Correct message keys for async batching mode #329

Merged
merged 1 commit into from Mar 29, 2015

Conversation

vshlapakov
Copy link
Contributor

There're some possible changes relative to #325.

As create_message_set() method is called only from base Producer class and from _send_upstream(), I've changed it a little bit, so messages sent as a list of (msg, key) tuples. I've added some basic tests also.

Take a look please, probably it can be improved.
(This PR is squashed to the other branch #326.)

@dpkp
Copy link
Owner

dpkp commented Mar 2, 2015

This seems like a reasonable approach. Another possibility would be to use a namedtuple. Will take a closer look in the next few days. Would like to get this issue fixed before next release!

@dpkp dpkp added the producer label Mar 3, 2015
@vshlapakov
Copy link
Contributor Author

@dpkp Indeed, it's an important fix, I can confirm that enabled Kafka log compaction will delete all messages with same keys at the topic, and it's an irreversible loss of data. I can change it with namedtuple (though don't see a big difference), just let me know if it's necessarily.

@dpkp dpkp added this to the 0.9.4 Release milestone Mar 24, 2015
dpkp added a commit that referenced this pull request Mar 29, 2015
Correct message keys for async batching mode
@dpkp dpkp merged commit 1a5cb03 into dpkp:master Mar 29, 2015
@vshlapakov vshlapakov deleted the feature-batch-msg-keys branch April 21, 2015 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants