springboot rocketmq配置文件
时间: 2023-09-05 09:12:49 浏览: 122
在Spring Boot项目中配置RocketMQ需要在项目的yml配置文件中加入以下内容:
```
server:
port: 8181
spring:
application:
name: rocketmq-producer
rocketmq:
name-server: 111.xxx.xxx.xxx:9876
producer:
group: test-group
```
其中,`server`部分可以根据具体需求进行配置,`spring.application.name`指定了应用的名称,`rocketmq.name-server`指定了RocketMQ的NameServer地址,`rocketmq.producer.group`指定了Producer的分组名称。这些配置项可以根据实际情况进行修改。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [Spring boot集成RocketMQ](https://blog.csdn.net/AnNanDu/article/details/127451633)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文