6.10 Client RocketMQ

范式

参考地址6.10 Client RocketMQ - 图1 (opens new window)

RocketMQConfig

配置项

名称类型描述
configNamestring该mq配置名
enablebool是否开启
addr[]string地址
groupstring消费组,默认为空
topicstring消费topic,默认为空
subExpressionstring标签,默认为*
rateint消费速率,默认为0,不限速

….

示例

  1. [jupiter.rocketmq]
  2. [jupiter.rocketmq.configName]
  3. [jupiter.rocketmq.configName.consumer]
  4. enable = true
  5. addr = ["127.0.0.1:9876"]
  6. group = "test_group"
  7. topic = "test_topic"
  8. subExpression = "*"
  9. rate = 1
  10. [jupiter.rocketmq.configName.producer]
  11. addr = ["127.0.0.1:9876"]
  12. group = "test_group"
  13. topic = "test_topic"