This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-spring.wiki.git
The following commit(s) were added to refs/heads/master by this push:
new 2cfbffd Created 消息轨迹 (markdown)
2cfbffd is described below
commit 2cfbffdaf63beac886752f86f3a6de28d1227575
Author: rongtong <[email protected]>
AuthorDate: Wed Dec 25 15:02:52 2019 +0800
Created 消息轨迹 (markdown)
---
...266\210\346\201\257\350\275\250\350\277\271.md" | 30 ++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git "a/\346\266\210\346\201\257\350\275\250\350\277\271.md"
"b/\346\266\210\346\201\257\350\275\250\350\277\271.md"
new file mode 100644
index 0000000..80241e8
--- /dev/null
+++ "b/\346\266\210\346\201\257\350\275\250\350\277\271.md"
@@ -0,0 +1,30 @@
+Producer 端要想使用消息轨迹,需要多配置两个配置项:
+
+```properties
+## application.properties
+rocketmq.name-server=127.0.0.1:9876
+rocketmq.producer.group=my-group
+
+rocketmq.producer.enable-msg-trace=true
+rocketmq.producer.customized-trace-topic=my-trace-topic
+```
+
+Consumer 端消息轨迹的功能需要在 `@RocketMQMessageListener` 中进行配置对应的属性:
+
+```
+@Service
+@RocketMQMessageListener(
+ topic = "test-topic-1",
+ consumerGroup = "my-consumer_test-topic-1",
+ enableMsgTrace = true,
+ customizedTraceTopic = "my-trace-topic"
+)
+public class MyConsumer implements RocketMQListener<String> {
+ ...
+}
+```
+
+> 注意:
+>
+> 默认情况下 Producer 和 Consumer 的消息轨迹功能是开启的且 trace-topic 为 RMQ_SYS_TRACE_TOPIC
+> Consumer 端的消息轨迹 trace-topic 可以在配置文件中配置
`rocketmq.consumer.customized-trace-topic` 配置项,不需要为在每个
`@RocketMQMessageListener` 配置。
\ No newline at end of file