[fix][broker] Pattern subscription doesn't work when the pattern excludes the topic domain. - #24072
Merged
Conversation
…udes the topic domain.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24072 +/- ##
============================================
+ Coverage 73.57% 74.23% +0.66%
+ Complexity 32624 32428 -196
============================================
Files 1877 1863 -14
Lines 139502 144291 +4789
Branches 15299 16459 +1160
============================================
+ Hits 102638 107115 +4477
+ Misses 28908 28719 -189
- Partials 7956 8457 +501
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
poorbarcode
approved these changes
Mar 13, 2025
lhotari
reviewed
Mar 13, 2025
lhotari
left a comment
Member
There was a problem hiding this comment.
Please also update the javadoc which is now outdated:
I guess it could be explained that the
persistent:// / non-persistent:// prefix is ignored when evaluating the pattern.
lhotari
reviewed
Mar 13, 2025
Member
|
Good work @shibd |
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Mar 21, 2025
…udes the topic domain. (apache#24072) (cherry picked from commit 3bae1d1) (cherry picked from commit bc02193)
mukesh-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Mar 21, 2025
…udes the topic domain. (apache#24072) (cherry picked from commit 3bae1d1) (cherry picked from commit bc02193)
nodece
pushed a commit
to nodece/pulsar
that referenced
this pull request
Mar 27, 2025
…udes the topic domain. (apache#24072) (cherry picked from commit 3bae1d1)
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Mar 29, 2025
…udes the topic domain. (apache#24072) (cherry picked from commit 3bae1d1) (cherry picked from commit 6797678)
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Mar 31, 2025
…udes the topic domain. (apache#24072) (cherry picked from commit 3bae1d1) (cherry picked from commit 6797678)
walkinggo
pushed a commit
to walkinggo/pulsar
that referenced
this pull request
Oct 8, 2025
…udes the topic domain. (apache#24072)
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.
Motivation
After #16062, we use a notification machine to discover topic changes for pattern subscriptions.
If the user sets a pattern string like
my-property/my-ns/test-pattern.*(without topic domain) when creating a subscription.It doesn't receive updates for the latest topics because the topic names include the domain when matching.
For example:
persistent://my-property/my-ns/test-pattern-1my-property/my-ns/test-pattern.*pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/TopicListService.java
Line 73 in fad925f
You can run test to reproduce it:
testSubscribePatterWithOutTopicDomainBTW: This issue has always existed, but some clients had a fallback by periodically querying topics for updates.
For the Java client, this has been removed after #20779, which is why the issue occurs.
Modifications
topic nameand thetopic patternfor matching.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: