Authentication is configured for producers and consumers in activemq.xml
<plugins> <simpleAuthenticationPlugin> <users> <authenticationUser username="user1" password="pas1" groups="users,admins"/> </users> </simpleAuthenticationPlugin> </plugins>
Log in to the ActiveMQ console to view the queue, and an error is reported in the background
The error is as follows:
javax.jms.JMSSecurityException: User name [system] or password is invalid.
Screenshot of official website description
We open the configuration file webapps \ admin \ WEB-INF \ webconsole-embedded.xml to see
The user name and password used by the connection factory are stored in credentials.properties, so we add this group of accounts to the authentication list
<plugins> <simpleAuthenticationPlugin> <users> <authenticationUser username="user1" password="pas1" groups="users,admins"/> <authenticationUser username="system" password="manager" groups="users,admins"/> </users> </simpleAuthenticationPlugin> </plugins>
Restart the service and no error will be reported