Skip to content

fix: improve zero queue consumer support for partitioned topics#1424

Merged
crossoverJie merged 4 commits intoapache:masterfrom
crossoverJie:fix-1421
Oct 10, 2025
Merged

fix: improve zero queue consumer support for partitioned topics#1424
crossoverJie merged 4 commits intoapache:masterfrom
crossoverJie:fix-1421

Conversation

@crossoverJie
Copy link
Member

Fixes #1421

Motivation

zero queue consumer support for partitioned topics.

Modifications

  • Use the partition index in the topic name
  • Remove detection of the topic name

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

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / GoDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

Copy link
Contributor

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

This PR fixes zero queue consumer support for partitioned topics by allowing consumers to target specific partitions rather than rejecting all partitioned topics.

  • Removes the restriction that prevented zero queue consumers from working with partitioned topics
  • Updates partition index validation to use the actual partition index instead of hardcoded zero
  • Adds proper error handling for Ack operations in tests

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pulsar/consumer_impl.go Removes partitioned topic detection logic that blocked zero queue consumers
pulsar/consumer_zero_queue.go Updates partition index handling to parse topic name and use actual partition index
pulsar/consumer_zero_queue_test.go Adds test coverage for specified partition consumers and improves error handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nodece nodece added this to the v0.17.0 milestone Oct 10, 2025
@crossoverJie crossoverJie merged commit ed7d498 into apache:master Oct 10, 2025
7 checks passed
@crossoverJie crossoverJie deleted the fix-1421 branch October 10, 2025 06:15
@geniusjoe
Copy link
Contributor

Maybe related #1443

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zero queue support subscribing topic's partition

4 participants