Skip to content

[ISSUE #685] In rocketmq-v5-client-spring-boot-starter, configuring multiple topics is not supported. - #731

Merged
RongtongJin merged 1 commit into
apache:masterfrom
zhaohai666:fix_topics
Jun 16, 2025
Merged

RongtongJin merged 1 commit into
apache:masterfrom
zhaohai666:fix_topics

Conversation

@zhaohai666

Copy link
Copy Markdown
Contributor

fix topics

@RongtongJin RongtongJin changed the title fix topics [ISSUE #685] In rocketmq-v5-client-spring-boot-starter, configuring multiple topics is not supported. Jun 16, 2025
@RongtongJin
RongtongJin merged commit 9b8a3a3 into apache:master Jun 16, 2025

@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

Fixes the issue where configuring multiple topics via comma-separated string in rocketmq-v5-client-spring-boot-starter was not supported. The fix splits the topic string by comma before passing to setTopics(). Applied in both ExtTemplateResetConfiguration and RocketMQAutoConfiguration.

Findings

  • [Warning] topic.split(COMMA) does not trim whitespace — if a user configures "topic1, topic2" (with a space after the comma), the second topic will have a leading space. Consider using:
    Arrays.stream(topic.split(COMMA)).map(String::trim).filter(s -> !s.isEmpty()).toArray(String[]::new)
  • [Info] No test coverage for the multi-topic split behavior. Consider adding a test case that verifies comma-separated topics are correctly parsed.

Suggestions

  • Add a unit test for producerBuilder() that verifies "topic1,topic2" results in both topics being set.
  • Consider edge cases: empty string, single topic (no comma), trailing comma.

Automated review by github-manager-bot

@RockteMQ-AI

Copy link
Copy Markdown

Issue Evaluation

Category: bug | Status: Needs Info

This references issue #685 about multiple topic configuration not being supported in rocketmq-v5-client-spring-boot-starter. The description is very brief.

To proceed with verification, please provide:

  • The version of rocketmq-v5-client-spring-boot-starter you are using
  • Your configuration (how are multiple topics specified?)
  • The expected behavior vs actual behavior
  • Any error messages or stack traces

If this is a fix proposal, please include the code changes or link to a PR.


Automated evaluation by RockteMQ-AI

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.

4 participants