This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15190|Reply: 1

Activemq user permission configuration

[Copy link]
Posted on 7/27/2017 9:33:40 AM | | | |
Configure activemq.xml file
File address: conf/activemq.xml
Locate the "persistenceAdapter" node and add the following code under "persistenceAdapter":



Each authorizationEntry has read, write, and admin attributes, and the read permission corresponds to the read, write, and manage permissions. The read, write, and admin attributes are filled in with the name of the grops.
The above example shows that members of the writeruser group have permission to send messages; RederUser group has permission to read messages.
Note:activemq.xml The file cannot appear Chinese, otherwise an error will be reported when it starts

Permission configuration for Activemq learning (with picture)

Configure the groups.properties file

File address: conf/groups.properties



Add the following code:

#用户组名称=Username

admins=admin

rederusers=rederuser

writeusers=writeuser




Permission configuration for Activemq learning (with picture)


Configure users.properties
File address: conf/users.properties
Add the following code:
#用户名称=Password
admin=admin
rederuser=rederuser123456
writeuser=writeuser12345

Permission configuration for Activemq learning (with picture)

After configuring the above three profiles, restart the Activemq service.

Permission configuration for Activemq learning (with picture)
Configure spring

Spring Integration Activemq can refer to the document "Spring Integration Activemq", which only explains how to configure the username and password on the client and server side.
Client Configuration:
Add the following attributes under org.apache.activemq.ActiveMQConnectionFactory:



Permission configuration for Activemq learning (with picture)

Server-side configuration:
As with the client, add the following properties under org.apache.activemq.ActiveMQConnectionFactory:



Permission configuration for Activemq learning (with picture)

The configuration step is now over.







Previous:Share an MQTT testing tool
Next:.NET/C# ActiveMQ operation example [Source code]
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com