ni-ze edited a comment on pull request #3910:
URL: https://github.com/apache/rocketmq/pull/3910#issuecomment-1056063500
```java
String targetFileName = System.getProperty("rocketmq.home.dir") +
File.separator + "conf/plain_acl.yml";
Map<String, Object> backUpAclConfigMap =
AclUtils.getYamlDataObject(targetFileName, Map.class);
PlainAccessConfig plainAccessConfig = new PlainAccessConfig();
plainAccessConfig.setAccessKey("rocketmq3");
plainAccessConfig.setSecretKey("1234567890");
plainAccessConfig.setWhiteRemoteAddress("192.168.0.*");
plainAccessConfig.setDefaultGroupPerm("PUB");
plainAccessConfig.setDefaultTopicPerm("SUB");
List<String> topicPerms = new ArrayList<String>();
topicPerms.add("topicC=PUB|SUB");
topicPerms.add("topicB=PUB");
plainAccessConfig.setTopicPerms(topicPerms);
List<String> groupPerms = new ArrayList<String>();
groupPerms.add("groupB=PUB|SUB");
groupPerms.add("groupC=DENY");
plainAccessConfig.setGroupPerms(groupPerms);
PlainAccessValidator plainAccessValidator = new
PlainAccessValidator();
plainAccessValidator.updateAccessConfig(plainAccessConfig);
//delete first.
String accessKey = "rocketmq3";
plainAccessValidator.deleteAccessConfig(accessKey);
Thread.sleep(10000);
//add again
plainAccessValidator.updateAccessConfig(plainAccessConfig);
```
The above test can reproduce this bug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]