-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feat][broker] Expose configuration to allow to read marker type messages #25171
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
base: master
Are you sure you want to change the base?
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.
| 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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "the the reader…"
| PulsarClient client2 = PulsarClient.builder().serviceUrl(url2.toString()) | ||
| .statsInterval(0, TimeUnit.SECONDS).build(); | ||
|
|
||
| var reader = RawReader.create(client2, topicName, subName).get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to close, please use try-with-resources.
| return true; | ||
| } | ||
| for (String prefix : serviceConfig.getSubscriptionPrefixToSkipServerMarkerCheck()) { | ||
| if (name.startsWith(prefix)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
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: