-
Notifications
You must be signed in to change notification settings - Fork 898
Authentication and authorisation
rongtong edited this page Dec 25, 2019
·
1 revision
We need two more configurations for support ACL in producer.
## 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 configurerocketmq.producer.access-key
androcketmq.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 configurerocketmq.consumer.access-key
androcketmq.consumer.secret-key
as default value