ActiveMQ配置文件及安全验证机制
[size=large]1、修改控制台登录用户密码[/size] activemq的web管理界面:http://127.0.0.1:8161/admin activemq管控台使用jetty部署,需要修改密码则修改对应的配置文件C:\M\apache-activemq-5.14.1\conf\jetty-realm.properties [quote] admin: admin, admin user: user, user [/quote] [size=large] 2、消息安全机制:[/size]只有符合认证的用户才能进行发送和获取消息 2.1 到C:\M\apache-activemq-5.14.1\confactivemq.xml添加安全验证。 [img]http://dl2.iteye.com/upload/attachment/0125/1896/d959cc45-be44-3b8d-91e1-221cbfca6f17.png[/img] 2.2 (生产者/消费者)MessageProducer/MessageConsumer创建connection连接时设置对应的用户名和密码 [code="java"] Connection connection = connectionFactory.createConnection("fu","fu"); connection.start(); [/code] [size=large] 3、confactivemq.xml配置 [/size] [code="xml"] file:${activemq.conf}/credentials.properties [/code]