Drop recursion in Fetcher _unpack_message_set #755
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempt to simplify unpacking of compressed messages. Related to #718 -- KafkaConsumer no longer attempts to decompress more than a single layer of messages. If a message set was double-compressed by the producer, this patch will cause KafkaConsumer to return the compressed bytes as a single message for the entire batch. A warning will be logged, but otherwise the data will no longer appear "skipped", it will appear as corrupted. If the user wants to simply skip these messages, there is a new configuration parameter
skip_double_compressed_messages
Longer term we should refactor Message / MessageSets to expose raw bytes and let handle_fetch_response unpack and decompress (this is how the java client operates)