Skip to content
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

[feat] Support pattern subscribe non-persistent topic. #207

Merged
merged 2 commits into from Mar 31, 2023

Conversation

shibd
Copy link
Member

@shibd shibd commented Mar 3, 2023

Master Issue: #204

Motivation

The current default only lookup persistent topics on the namespace, We need to add RegexSubscriptionMode to control the lookup topics type.

The Java client relate impl refer: apache/pulsar#2025

Modifications

  • Add RegexSubscriptionMode to support pattern subscribe all/persistent only/non-persistent-only topic.
  • Disable system topic.

Verifying this change

  • TopicNameTest.testRemoveDomain to cover the newly added TopicName::removeDomain method.
  • TopicNameTest.testContainsDomain to cover the newly added TopicName::containsDomain method.
  • Refactor LookupServiceTest.basicGetNamespaceTopics method to cover more get topics cases.
  • ConsumerTest.testPatternSubscribeTopic to cover use pattern subscribe to persistent topic, non-persistent topic, and all topic.

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

@shibd shibd added the bug Something isn't working label Mar 3, 2023
@shibd shibd added this to the 3.2.0 milestone Mar 3, 2023
@shibd shibd self-assigned this Mar 3, 2023
@RobertIndie
Copy link
Member

I decide what subscriptionTopicsMode is based on the fact that the domain is included in the pattern.

Great idea. Are there any other contexts that we need to use RegexSubscriptionMode except for this case in the Java client? Would it be possible also apply this solution to the Java client?

@shibd
Copy link
Member Author

shibd commented Mar 13, 2023

Are there any other contexts that we need to use RegexSubscriptionMode except for this case in the Java client?

There is no other case using RegexSubscriptionMode.

Would it be possible also apply this solution to the Java client?

Yes, I'll start an email to discuss this.

@shibd
Copy link
Member Author

shibd commented Mar 13, 2023

@shibd shibd force-pushed the regex_non_persistent_topic branch from 6498f13 to 5ac904e Compare March 27, 2023 14:53
@shibd
Copy link
Member Author

shibd commented Mar 27, 2023

After, we need to add a RegexSubscriptionMode config. PTAL.

/cc @RobertIndie @BewareMyPower

test-conf/standalone-ssl.conf Show resolved Hide resolved
lib/HTTPLookupService.h Outdated Show resolved Hide resolved
lib/PatternMultiTopicsConsumerImpl.cc Outdated Show resolved Hide resolved
@shibd shibd force-pushed the regex_non_persistent_topic branch 2 times, most recently from 09e2871 to 6f93009 Compare March 30, 2023 14:22
@shibd shibd force-pushed the regex_non_persistent_topic branch from 6f93009 to 8607653 Compare March 31, 2023 03:39
@shibd shibd merged commit d0d7e39 into apache:main Mar 31, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants