1. Add user information
The activemq console is deployed using jetty, and changing the password requires the corresponding configuration file. /conf/jetty-realm.properties
2. Activemq is equipped with a security mechanism, and only users who meet the authentication can send and obtain information. /conf/activemq.xml add the configuration after line 123 (inside the broker node). The user here is the real java program to connect mq
<plugins>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="kim" password="kim" groups="admins,publishers,consumers"/>
</users>
</simpleAuthenticationPlugin>
</plugins>
java program
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("kim","kim", "tcp://localhost:61616");