Skip to content

Support deserializing a message id from bytes and topic #259

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

Merged
merged 2 commits into from
Jun 8, 2025

Conversation

BewareMyPower
Copy link
Contributor

This is a catch up for Java's MessageId#fromByteArrayWithTopic.

The topic name is not a part of message id's protobuf definition, while the multi-topics consumer requires a message id with topic name set. There is no way to create a message id with topic name set from the serialized bytes.

With this patch, users should serialize message id, as well as the topic name. During the deserialization, pass the topic name as the 2nd argument of MessageId.deserialize.

@BewareMyPower BewareMyPower added this to the 3.8.0 milestone Jun 6, 2025
@BewareMyPower BewareMyPower self-assigned this Jun 6, 2025
@BewareMyPower BewareMyPower added the enhancement New feature or request label Jun 6, 2025
@BewareMyPower BewareMyPower merged commit 2a631d6 into apache:main Jun 8, 2025
11 checks passed
@BewareMyPower BewareMyPower deleted the bewaremypower/topic-msg-id branch June 8, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants