-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of unencodable messages
Move `Key.Encode()` and `Value.Encode()` calls slightly earlier (to `groupAndFilter`) where we have access to the batch in order to be able to remove them from consideration on error. Otherwise failed messages would not be removed from the batch and could end up returned twice. Add cache members to the ProducerMessage struct to store the results until we actually need them. Fixes #449. This is perhaps not the most elegant solution. However it is correct and a better solution would be a lot more invasive. This will do in order to ship the fix in a 1.5.1 patch release.
- Loading branch information
Showing
1 changed file
with
22 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters