参数 version 4.6
1. consumerGroup 消费者分组
2. topic 主题
3. selectorType 消息选择器类型
- 默认值 SelectorType.TAG 根据TAG选择
仅支持表达式格式如:“tag1 || tag2 || tag3”,如果表达式为null或者“*”标识订阅所有消息 - SelectorType.SQL92 根据SQL92表达式选择
- 关键字:
AND, OR, NOT, BETWEEN, IN, TRUE, FALSE, IS, NULL - 数据类型:
Boolean, like: TRUE, FALSE
String, like: ‘abc’
Decimal, like: 123
Float number, like: 3.1415 - 语法:
AND, OR
>, >=, <, <=, =
BETWEEN A AND B, equals to >=A AND <=B
NOT BETWEEN A AND B, equals to >B OR <A
IN ('a', 'b'), equals to ='a' OR ='b', this operation only support String type.
IS NULL, IS NOT NULL, check parameter whether is null, or not.
=TRUE, =FALSE, check parameter whether is true, or false.
- 样例:
(a > 10 AND a < 100) OR (b IS NOT NULL AND b=TRUE)
4. selectorExpression 选择器表达式
默认值 ”*“
5. consumeMode 消费模式
- 默认值 ConsumeMode.CONCURRENTLY 并行处理
- ConsumeMode.ORDERLY 按顺序处理
6. messageModel 消息模型
- 默认值 MessageModel.CLUSTERING 集群
- MessageModel.BROADCASTING 广播
7. consumeThreadMax 最大线程数
默认值 64
8. consumeTimeout 超时时间
默认值 30000ms
9. accessKey
默认值 ${rocketmq.consumer.access-key:}
10. secretKey
默认值 ${rocketmq.consumer.secret-key:}
11. enableMsgTrace 启用消息轨迹
默认值 true
12. customizedTraceTopic 自定义的消息轨迹主题
默认值 ${rocketmq.consumer.customized-trace-topic:}
没有配置此配置项则使用默认的主题
13. nameServer 命名服务器地址
默认值 ${rocketmq.name-server:}
14. accessChannel
默认值 ${rocketmq.access-channel:}