rocketmq-spring icon indicating copy to clipboard operation
rocketmq-spring copied to clipboard

@RocketMQMessageListener怎么没有MessageModel广播模式的配置了

Open JogJo opened this issue 11 months ago • 10 comments

通过@RocketMQMessageListener实现消费者,无法设置为广播消费,rocketmq-v5-client-spring-boot这个包要如何使用?

<dependency>
	<groupId>org.apache.rocketmq</groupId>
	<artifactId>rocketmq-v5-client-spring-boot</artifactId>
	<version>2.3.5</version>
</dependency>
Image

JogJo avatar Dec 17 '25 06:12 JogJo

RocketMQ V5原生API的广播支持有限

// 原生V5客户端API ClientServiceProvider provider = ClientServiceProvider.loadService(); ConsumerBuilder consumerBuilder = provider.newConsumerBuilder() .setClientConfiguration(clientConfiguration) .setConsumerGroup("consumer-group");

chathoward712-cpu avatar Dec 20 '25 06:12 chathoward712-cpu

Issue Evaluation

Type: Enhancement / Question Category: Feature Request Priority: Low

Assessment

Valid feature request: @RocketMQMessageListener in rocketmq-v5-client-spring-boot lacks MessageModel broadcast mode configuration.

✅ Accepted — The v5 client Spring Boot starter should support broadcast mode configuration.

Suggested approach:

  1. Add messageModel attribute to @RocketMQMessageListener
  2. Support both CLUSTERING and BROADCASTING modes
  3. Update documentation with examples

🤖 Automated evaluation by oss-sentinel-ai

oss-sentinel-ai avatar Jun 10 '26 03:06 oss-sentinel-ai

Issue Evaluation

Category: question

The rocketmq-v5-client-spring-boot module is based on the RocketMQ 5.x gRPC protocol. Currently, broadcast mode configuration may not be exposed through the @RocketMQMessageListener annotation in this module.

Suggestions:

  • Check if SimpleConsumer or PushConsumer in the v5 client supports broadcast mode via configuration properties
  • If not available, consider using the classic rocketmq-spring-boot-starter which has full broadcast mode support
  • You may also open a feature request to add broadcast mode support to the v5 client spring boot starter

For more details, refer to the RocketMQ 5.x documentation.


Automated evaluation by RockteMQ-AI

RockteMQ-AI avatar Aug 05 '26 11:08 RockteMQ-AI

This issue evaluation has timed out — no community feedback was received within the 72-hour window.

The analysis and proposed fix remain available in the earlier comment for anyone who would like to pick it up. If a maintainer or contributor wants to proceed, feel free to open a PR referencing this issue.

Closing the automated workflow. Thank you for your understanding!

RockteMQ-AI avatar Aug 10 '26 18:08 RockteMQ-AI

Issue Evaluation

Category: question

In the rocketmq-v5-client-spring-boot module (v5 client-based), the broadcast consumption mode configuration has changed from the v4-based rocketmq-spring-boot-starter.

The v5 client uses a different consumer model. To configure broadcast mode:

  • The @RocketMQMessageListener annotation in the v5 module may not directly expose MessageModel.BROADCASTING as in the v4 module
  • Check if the v5 annotation supports messageModel attribute — if not, this is a missing feature in the v5 Spring Boot integration

Workaround: If the v5 module doesn't support broadcast mode yet, you can:

  1. Use the v4-based rocketmq-spring-boot-starter (which supports messageModel = MessageModel.BROADCASTING)
  2. Or configure broadcast mode programmatically using the v5 client API directly

This appears to be a feature gap in the v5 Spring Boot starter that should be addressed.


Automated evaluation by RockteMQ-AI

RockteMQ-AI avatar Aug 21 '26 03:08 RockteMQ-AI

Issue Evaluation

Category: question

The rocketmq-v5-client-spring-boot (2.x series) uses the new RocketMQ 5.x gRPC client, which has a different annotation model than the legacy 4.x client. Broadcast consumption mode configuration may differ from the older @RocketMQMessageListener API.

Current status: The 5.x client Spring Boot starter may not yet expose broadcast mode through the annotation. Check the latest documentation or source code for the correct configuration approach.

Workaround: If broadcast mode is not available through the annotation, you can configure it programmatically by creating a PushConsumer bean directly with the appropriate MessageModel setting.


Automated evaluation by github-manager

RockteMQ-AI avatar Aug 24 '26 12:08 RockteMQ-AI

Issue Evaluation\n\nCategory: question | Status: Needs Clarification\n\nThis appears to be a usage question or configuration issue. Please provide:\n- RocketMQ Spring version\n- Configuration details\n- Error logs or stack traces if applicable\n\nFor usage questions, consider checking the documentation or asking in GitHub Discussions.\n\n---\nAutomated evaluation by github-manager

RockteMQ-AI avatar Aug 27 '26 14:08 RockteMQ-AI

Issue Evaluation

Category: question

In rocketmq-v5-client-spring-boot, the consumer model configuration has changed compared to v4. The v5 client uses a different consumer model. For broadcast consumption, you should configure it through the consumerModel property:

rocketmq.consumer.broadcast=true

Or check if the specific version you are using supports the @RocketMQMessageListener(consumerModel = ConsumerModel.BROADCASTING) attribute. If the attribute is missing in v5, this may be a feature gap that needs to be addressed by the maintainers.

Please refer to the rocketmq-spring documentation for v5-specific configuration.


Automated evaluation by RockteMQ-AI

RockteMQ-AI avatar Sep 01 '26 01:09 RockteMQ-AI

Issue Evaluation

Category: question

The @RocketMQMessageListener annotation does support broadcast mode through the messageModel attribute. The available values are:

  • MessageModel.CLUSTERING (default) — load balancing across consumers
  • MessageModel.BROADCASTING — every consumer receives every message

Example:

@RocketMQMessageListener(
    topic = "my-topic",
    consumerGroup = "my-group",
    messageModel = MessageModel.BROADCASTING
)

Automated evaluation by github-manager-bot

RockteMQ-AI avatar Sep 04 '26 00:09 RockteMQ-AI

Issue Evaluation

Category: type/question

The rocketmq-v5-client-spring-boot module currently uses the gRPC-based 5.x client, which has a different consumer model than the 4.x remoting client. Broadcast mode configuration may differ in the 5.x client API.

For the 5.x Spring Boot starter, check the module's documentation and samples for the correct way to configure message model. If broadcast mode is not yet supported in the v5 starter, this would be a feature request.


Automated evaluation by github-manager

RockteMQ-AI avatar Sep 13 '26 18:09 RockteMQ-AI