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.
|