Skip to content

support simple consumer supports subscribing to multiple topics - #772

Merged
RongtongJin merged 5 commits into
apache:masterfrom
panzhi33:simpleconumer_sub_muilt_topic
Apr 3, 2026
Merged

support simple consumer supports subscribing to multiple topics#772
RongtongJin merged 5 commits into
apache:masterfrom
panzhi33:simpleconumer_sub_muilt_topic

Conversation

@panzhi33

Copy link
Copy Markdown
Contributor

What is the purpose of the change

XXXXX

Brief changelog

XX

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist.
  • Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@RongtongJin
RongtongJin merged commit 71d84b8 into apache:master Apr 3, 2026
2 of 3 checks passed
@RockteMQ-AI

Copy link
Copy Markdown

Issue Evaluation

Category: enhancement | Status: Evaluated

This is a feature request to support SimpleConsumer subscribing to multiple topics simultaneously. Currently, SimpleConsumer in rocketmq-spring is limited to single-topic subscription.

Feasibility: feasible
Scope: rocketmq-spring-boot-starter, SimpleConsumer configuration and listener registration
Compatibility: additive change, no breaking changes expected

This aligns with the v5 client SDK SimpleConsumer design which already supports multi-topic consumption. The spring starter should expose this capability through configuration.


Automated evaluation by github-manager-bot

@RockteMQ-AI

Copy link
Copy Markdown

Hi @panzhi33, thanks for this contribution adding multi-topic subscription support for the simple consumer.

A few things need attention before this can be reviewed:

  1. PR description is incomplete — The template placeholders (XXXXX) haven't been filled in. Please update the description with:

    • What the change does and why
    • How to verify the change
    • Any relevant issue references
  2. This PR is 5 months old — Could you confirm this is still actively being worked on? If the feature is no longer needed, please close the PR.

  3. Typo in module name — The sample module is named rocketmq-v5-client-consume-simple-subscribe-muliti-topic-demo (note: muliti should be multi).

Please update the PR description and we can proceed with a proper review.


Automated notification by github-manager-bot

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

Extends SimpleConsumer configuration to support subscribing to multiple topics with per-topic filter expressions, replacing the previous single-topic limitation. Good architectural improvement.

Findings

  • [Critical] samples/pom.xml — duplicate module entry will break Maven build
  • [Warning] Module name typo: "muliti" → "multi"
  • [Warning] No unit tests for the new multi-topic subscription logic
  • [Warning] PR description contains placeholder text (XXXXX) — please fill in the actual change summary

Suggestions

  1. Fix the duplicate module entry in samples/pom.xml
  2. Add at least one unit test verifying multi-topic subscription configuration parsing
  3. Fill in the PR description with actual change details

Automated review by github-manager-bot

<module>rocketmq-v5-client-consumer-simple-demo</module>
<module>rocketmq-v5-client-consumer-push-simple-demo</module>
</modules>
<module>rocketmq-v5-client-consume-simple-subscribe-muliti-topic-demo</module>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This module is listed twice — rocketmq-v5-client-consume-simple-subscribe-muliti-topic-demo appears on both line 38 and 39. This will cause a Maven build error (Malformed POM). Please remove the duplicate entry.

<module>rocketmq-v5-client-consumer-simple-demo</module>
<module>rocketmq-v5-client-consumer-push-simple-demo</module>
</modules>
<module>rocketmq-v5-client-consume-simple-subscribe-muliti-topic-demo</module>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Typo in module name: muliti should be multi. Consider renaming the directory and module to rocketmq-v5-client-consume-simple-subscribe-multi-topic-demo.

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.

3 participants