Skip to content

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

2 participants