与Apache Active MQ的SSL连接
问题描述:
我正在尝试为Apache Active MQ使用SSL - 但失败。与Apache Active MQ的SSL连接
我的例子正常工作与 “TCP://本地主机:61616” - 但失败, “SSL://本地主机:61616”
BrokerService broker = new BrokerService();
broker.setUseJmx(true);
broker.addConnector(ssl://localhost:61616);
broker.start();
我的控制台显示(与-Djavax.net.debug = SSL)吨相同的日志消息: ....
ActiveMQ Transport Server: ssl://localhost:61616, called closeSocket() Allow unsafe renegotiation: false Allow legacy hello messages: true Is initial handshake: true Is secure renegotiation: false ActiveMQ Transport Server: ssl://localhost:61616, called closeSocket() Allow unsafe renegotiation: false Allow legacy hello messages: true Is initial handshake: true Is secure renegotiation: false
....
我在做什么错?
答
您应该查看ActiveMQ网站上的documentation以使用SSL。您需要适当地设置密钥库和信任库,以便客户端和服务器通过SSL进行协商以建立信任关系。您可能还需要查看ActiveMQ源代码中的SSL单元测试,以深入了解如何使用SSL传输来设置BrokerService对象。