Skip to content

feat(topic): add subscription dispatch rate commands#2013

Open
freeznet wants to merge 2 commits intomasterfrom
freeznet/subscription-cmds
Open

feat(topic): add subscription dispatch rate commands#2013
freeznet wants to merge 2 commits intomasterfrom
freeznet/subscription-cmds

Conversation

@freeznet
Copy link
Member

(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

  • Make sure that the change passes the CI checks.

(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:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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)

@freeznet freeznet self-assigned this Mar 11, 2026
@github-actions
Copy link

@freeznet:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions github-actions bot added the doc-info-missing This pr needs to mark a document option in description label Mar 11, 2026
@freeznet freeznet requested a review from Copilot March 11, 2026 13:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@freeznet freeznet force-pushed the freeznet/subscription-cmds branch from 125a63a to c718ea4 Compare March 11, 2026 13:23
@freeznet
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-info-missing This pr needs to mark a document option in description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants