[feat][broker] Expose configuration to allow to read marker type messages#25171
Open
zymap wants to merge 1 commit intoapache:masterfrom
Open
[feat][broker] Expose configuration to allow to read marker type messages#25171zymap wants to merge 1 commit intoapache:masterfrom
zymap wants to merge 1 commit intoapache:masterfrom
Conversation
…ages --- ### Motivation When using RawReader to read messages, we want to read all the messages from the broker. And handle the marker type in the reader side.
Denovo1998
suggested changes
Jan 26, 2026
Comment on lines
+4024
to
+4027
| doc = "For some use case like compaction, raw reader want to read all the data from the topics and handle the " | ||
| + "marker by the reader. It needs to skip the marker check to delivery the message to the consumer. " | ||
| + "This configuration allows to configure a subscription prefix, the the reader which has the prefix " | ||
| + "will receive all the data." |
Contributor
There was a problem hiding this comment.
typo: "the the reader…"
| PulsarClient client2 = PulsarClient.builder().serviceUrl(url2.toString()) | ||
| .statsInterval(0, TimeUnit.SECONDS).build(); | ||
|
|
||
| var reader = RawReader.create(client2, topicName, subName).get(); |
Contributor
There was a problem hiding this comment.
Need to close, please use try-with-resources.
| producer.newMessage(txn).value("message-1").send(); | ||
| txn.commit().get(); | ||
|
|
||
| var reader = RawReader.create(pulsarClient, topic, "__supervisor-01").get(); |
Contributor
There was a problem hiding this comment.
Need to close, please use try-with-resources.
| return true; | ||
| } | ||
| for (String prefix : serviceConfig.getSubscriptionPrefixToSkipServerMarkerCheck()) { | ||
| if (name.startsWith(prefix)) { |
Contributor
There was a problem hiding this comment.
If paired with "" (empty string), startsWith("") will allow all subscriptions to receive the marker.
If paired with "__", it might cause many internal subscriptions to receive the marker.
Here these two need to be ignored?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #xyz
Main Issue: #xyz
PIP: #xyz
Motivation
When using RawReader to read messages, we want to read all the messages from the broker. And handle the marker type on the reader side.
Modifications
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: