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

Differentiate KafkaMessage type between Record and Message #1401

Merged
merged 2 commits into from Jun 28, 2022

Conversation

Nevon
Copy link
Collaborator

@Nevon Nevon commented Jun 22, 2022

The size attribute is only ever present on pre-0.10 Messages, and never on the new Record. The field was mistakenly defined as being non-optional.

The `size` attribute is only ever present on pre-0.10 `Messages`,
and never on the new `Record`. The field was mistakenly defined as
being non-optional.

Providing a meaningful `size` field for Record is tricky because in
RecordBatch all the records are compressed together, rather than individually
as is the case with the old Message protocol. Therefore you can only
calculate a size for the uncompressed record, which isn't very useful
since you most likely care about the size because you want to understand
the size over the network.
@Nevon Nevon merged commit 48b8bc7 into master Jun 28, 2022
@Nevon Nevon deleted the fix-message-size-type branch June 28, 2022 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant