rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinrongt...@apache.org
Subject [rocketmq-spring.wiki] branch master updated: Created ACL功能 (markdown)
Date Wed, 25 Dec 2019 07:04:34 GMT
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 5aac7fc  Created ACL功能 (markdown)
5aac7fc is described below

commit 5aac7fca6f30fc6fa231324cef1ac23bb9b2b61a
Author: rongtong <jinrongtong5@163.com>
AuthorDate: Wed Dec 25 15:04:31 2019 +0800

    Created ACL功能 (markdown)
---
 "ACL\345\212\237\350\203\275.md" | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git "a/ACL\345\212\237\350\203\275.md" "b/ACL\345\212\237\350\203\275.md"
new file mode 100644
index 0000000..a2b61d4
--- /dev/null
+++ "b/ACL\345\212\237\350\203\275.md"
@@ -0,0 +1,28 @@
+Producer 端要想使用 ACL 功能,需要多配置两个配置项:
+
+```properties
+## application.properties
+rocketmq.name-server=127.0.0.1:9876
+rocketmq.producer.group=my-group
+
+rocketmq.producer.access-key=AK
+rocketmq.producer.secret-key=SK
+```
+Consumer 端 ACL 功能需要在 `@RocketMQMessageListener` 中进行配置
+
+```
+@Service
+@RocketMQMessageListener(
+    topic = "test-topic-1", 
+    consumerGroup = "my-consumer_test-topic-1",
+    accessKey = "AK",
+    secretKey = "SK"
+)
+public class MyConsumer implements RocketMQListener<String> {
+    ...
+}
+```
+
+> 注意:
+> 
+> 可以不用为每个 `@RocketMQMessageListener` 注解配置 AK/SK,在配置文件中配置
`rocketmq.consumer.access-key` 和 `rocketmq.consumer.secret-key` 配置项,这两个配置项的值就是默认值
\ No newline at end of file


Mime
View raw message