Skip to content

feat: expose replicated_from proto field to Message#583

Merged
BewareMyPower merged 2 commits into
apache:mainfrom
BewareMyPower:bewaremypower/replicated
Jun 1, 2026
Merged

feat: expose replicated_from proto field to Message#583
BewareMyPower merged 2 commits into
apache:mainfrom
BewareMyPower:bewaremypower/replicated

Conversation

@BewareMyPower
Copy link
Copy Markdown
Contributor

@BewareMyPower BewareMyPower commented Jun 1, 2026

fixes #569

@BewareMyPower BewareMyPower self-assigned this Jun 1, 2026
@BewareMyPower BewareMyPower added this to the 4.2.0 milestone Jun 1, 2026
@BewareMyPower BewareMyPower requested a review from Copilot June 1, 2026 05:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR exposes Pulsar’s replicated_from message metadata through the public C++ Message API and the C client wrapper, enabling consumers to detect geo-replicated messages (per issue #569).

Changes:

  • Add Message::getReplicatedFrom() and a corresponding C API pulsar_message_get_replicated_from().
  • Add C++ and C unit tests that validate access to replicated_from metadata via a test-only PulsarFriend hook.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/MessageTest.cc Adds a unit test for the new C++ replication accessor.
tests/c/c_MessageTest.cc Adds a unit test for the new C replication accessor.
lib/Message.cc Implements Message::getReplicatedFrom().
lib/c/c_Message.cc Implements pulsar_message_get_replicated_from().
include/pulsar/Message.h Declares the new public C++ accessor.
include/pulsar/c/message.h Declares the new public C accessor and documents its lifetime.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/pulsar/Message.h
Comment thread lib/Message.cc
Comment thread lib/c/c_Message.cc
Comment thread include/pulsar/Message.h
Comment thread lib/Message.cc
Comment thread lib/c/c_Message.cc
@BewareMyPower BewareMyPower merged commit f2c0fec into apache:main Jun 1, 2026
14 checks passed
@BewareMyPower BewareMyPower deleted the bewaremypower/replicated branch June 1, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose isReplicated() / getReplicatedFrom() on the public Message API

3 participants