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 fdae961  Created Authentication and authorisation (markdown)
fdae961 is described below

commit fdae961de3454f2fece9b8f50c7ba878dc911f24
Author: rongtong <[email protected]>
AuthorDate: Wed Dec 25 16:11:29 2019 +0800

    Created Authentication and authorisation (markdown)
---
 Authentication-and-authorisation.md | 45 +++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/Authentication-and-authorisation.md 
b/Authentication-and-authorisation.md
new file mode 100644
index 0000000..61ef756
--- /dev/null
+++ b/Authentication-and-authorisation.md
@@ -0,0 +1,45 @@
+We need two more configurations for support ACL in producer.
+
+```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
+```
+Transaction Message should configure AK/SK in `@RocketMQTransactionListener`. 
+
+```
+@RocketMQTransactionListener(
+    txProducerGroup = "test,
+    accessKey = "AK",
+    secretKey = "SK"
+)
+class TransactionListenerImpl implements RocketMQLocalTransactionListener {
+    ...
+}
+```
+
+> Note:
+> 
+> You do not need to configure AK/SK for each `@RocketMQTransactionListener`, 
you could configure `rocketmq.producer.access-key` and 
`rocketmq.producer.secret-key` as default value
+
+The ACL feature in consumer should configure AK/SK in 
`@RocketMQMessageListener`.
+
+```
+@Service
+@RocketMQMessageListener(
+    topic = "test-topic-1", 
+    consumerGroup = "my-consumer_test-topic-1",
+    accessKey = "AK",
+    secretKey = "SK"
+)
+public class MyConsumer implements RocketMQListener<String> {
+    ...
+}
+```
+
+> Note:
+> 
+> You do not need to configure AK/SK for each `@RocketMQMessageListener`, you 
could configure `rocketmq.consumer.access-key` and 
`rocketmq.consumer.secret-key` as default value
\ No newline at end of file

Reply via email to