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 d8fcf1c  Created Message Tracing (markdown)
d8fcf1c is described below

commit d8fcf1cccca60a8b017444e9abc4bda4fe901eac
Author: rongtong <[email protected]>
AuthorDate: Wed Dec 25 16:10:44 2019 +0800

    Created Message Tracing (markdown)
---
 Message-Tracing.md | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/Message-Tracing.md b/Message-Tracing.md
new file mode 100644
index 0000000..ef45787
--- /dev/null
+++ b/Message-Tracing.md
@@ -0,0 +1,31 @@
+We need two more configurations for support message trace in 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
+```
+
+The message trace in consumer should configure in `@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> {
+    ...
+}
+```
+> Note:
+> 
+> Maybe you need change `127.0.0.1:9876` with your real NameServer address for 
RocketMQ
+
+> By default, the message track feature of Producer and Consumer is turned on 
and the trace-topic is RMQ_SYS_TRACE_TOPIC
+> The topic of message trace can be configured with 
`rocketmq.consumer.customized-trace-topic` configuration item, not required to 
be configured in each `@RocketMQMessageListener`
\ No newline at end of file

Reply via email to