Skip to content

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

@shibd shibd requested a review from BewareMyPower March 29, 2023 09:39
@shibd shibd force-pushed the regex_non_persistent_topic branch 2 times, most recently from 09e2871 to 6f93009 Compare March 30, 2023 14:22
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.

3 participants