feat(mq): 实现评论发布消息消费功能

- 新增 Comment2DBConsumer 消费者类,用于处理评论发布消息- 配置 RocketMQ 消费者,订阅 PublishCommentTopic 主题
- 实现消息监听逻辑,支持批量消费和手动确认机制
- 添加令牌桶限流控制,限制每秒处理消息数量
- 集成 Spring Boot 生命周期管理,确保消费者优雅关闭
- 新增 MQ 测试类 MQTests,验证消息发送与消费流程
- 引入 rocketmq-client 依赖以支持 RocketMQ 功能
This commit is contained in:
2025-11-04 21:53:28 +08:00
parent eb19d52fcb
commit c37b16ff42
3 changed files with 146 additions and 0 deletions

View File

@@ -97,6 +97,12 @@
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- Rocket MQ 客户端 -->
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-client</artifactId>
</dependency>
</dependencies>