feat(topic): add subscription dispatch rate commands#2013
feat(topic): add subscription dispatch rate commands#2013
Conversation
|
@freeznet:Thanks for your contribution. For this PR, do we need to update docs? |
There was a problem hiding this comment.
Pull request overview
Adds topic-level CLI support for managing subscription dispatch rate policies, aligning topic commands with existing policy-management patterns and extending integration-style coverage.
Changes:
- Register 3 new topic subcommands:
get-subscription-dispatch-rate,set-subscription-dispatch-rate,remove-subscription-dispatch-rate. - Implement the get/set/remove command handlers that call the Pulsar admin Topics API for subscription dispatch rate.
- Add tests covering set/get/remove flows and non-existent topic error cases.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/ctl/topic/topic.go | Wires the new subscription-dispatch-rate commands into the topics command group (and removes duplicate dispatch-rate registrations). |
| pkg/ctl/topic/get_subscription_dispatch_rate.go | Implements retrieval of topic subscription dispatch rate with standard output formatting. |
| pkg/ctl/topic/set_subscription_dispatch_rate.go | Implements setting topic subscription dispatch rate, including flags for msg/byte/period/relative-to-publish-rate. |
| pkg/ctl/topic/remove_subscription_dispatch_rate.go | Implements removal of topic subscription dispatch rate policy. |
| pkg/ctl/topic/subscription_dispatch_rate_test.go | Adds tests validating behavior for get/set/remove and non-existent topics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
125a63a to
c718ea4
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
(If this PR fixes a github issue, please add
Fixes #<xyz>.)Fixes #
(or if this PR is one task of a github issue, please add
Master Issue: #<xyz>to link to the master issue.)Master Issue: #
Motivation
Explain here the context, and why you're making that change. What is the problem you're trying to solve.
Modifications
Describe the modifications you've done.
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:)
Documentation
Check the box below.
Need to update docs?
doc-required(If you need help on updating docs, create a doc issue)
no-need-doc(Please explain why)
doc(If this PR contains doc changes)