下载activemq-5.16.3,进入apache-activemq-5.16.3\bin\win64,点击activemq.bat
启动activemq(本机测试),会显示控制台登录地址:http://127.0.0.1:8161/,默认用户密码admin/admin,登录后会看到activemq的Queues信息。默认情况应用程序访问 tcp://127.0.0.1:61616发送和接收消息无需用户名和密码。
开启用户和密码验证
1、windows 环境64位下测试,找到apache-activemq-5.16.3\conf 目录下的activemq.xml文件加上下面内容,开启用户密码验证
<plugins>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="${activemq.username}" password="${activemq.password}" groups="users,admins"/>
</users>
</simpleAuthenticationPlugin>
</plugins>
2、程序访问的用户名密码设置:apache-activemq-5.16.3\conf\credentials.properties文件
3、重启activemq,启动项目,如果用户名或密码不对会报异常