Skip to content

[feature][broker] Support autoSubscriptionCreation on topic level - #17720

Merged
yuruguo merged 1 commit into
apache:masterfrom
yuruguo:allow-auto-subscription-creation-on-topic
Nov 2, 2022
Merged

yuruguo merged 1 commit into
apache:masterfrom
yuruguo:allow-auto-subscription-creation-on-topic

Conversation

@yuruguo

@yuruguo yuruguo commented Sep 19, 2022 •

Copy link
Copy Markdown
Contributor

Motivation

Current pulsar only support to set autoSubscriptionCreation on broker and namespace level, but we can further set this policy on the topic level.

Modifications

  • Add admin api for topic to set/get/remove autoSubscriptionCreation
  • handleSubscribe in ServerCnx need to check autoSubscriptionCreation policy of topic

Documentation

  • doc-not-needed

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Sep 19, 2022
@yuruguo yuruguo self-assigned this Sep 19, 2022
@yuruguo yuruguo changed the title [broker][admin] Support to set/get/remove autoSubscriptionCreation on topic [feature][broker] Support autoSubscriptionCreation on topic level Sep 21, 2022
@yuruguo yuruguo added this to the 2.12.0 milestone Sep 21, 2022
@yuruguo yuruguo added type/feature The PR added a new feature or issue requested a new feature area/broker labels Sep 21, 2022
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@d7c09be). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #17720   +/-   ##
=========================================
  Coverage          ?   23.64%           
  Complexity        ?     4757           
=========================================
  Files             ?      685           
  Lines             ?    67385           
  Branches          ?     7218           
=========================================
  Hits              ?    15930           
  Misses            ?    49096           
  Partials          ?     2359           
Flag Coverage Δ
unittests 23.64% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@Jason918 Jason918 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
But BrokerService#isAllowAutoSubscriptionCreation(org.apache.pulsar.common.naming.TopicName) can be optimized with HierarchyTopicPolicies in future PR.

@yuruguo
yuruguo merged commit 681d51d into apache:master Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker doc-not-needed Your PR changes do not impact docs ready-to-test type/feature The PR added a new feature or issue requested a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants