与 Apache Active MQ 的 SSL 连接
我正在尝试对 Apache Active MQ 使用 SSL - 但失败了。
我的示例在“tcp://localhost:61616”下工作正常,但在“ssl://localhost: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
?
我做错了什么
I am trying to use SSL for Apache Active MQ - but it fails.
My example works fine with "tcp://localhost:61616" - but fails with "ssl://localhost:61616"
BrokerService broker = new BrokerService();
broker.setUseJmx(true);
broker.addConnector(ssl://localhost:61616);
broker.start();
My console shows (with -Djavax.net.debug=ssl) tons of the same log messages:
....
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
....
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该查看 ActiveMQ 网站上的文档使用 SSL。您需要适当地设置密钥库和信任库,以便客户端和服务器通过 SSL 进行协商以建立信任。您可能还想查看 ActiveMQ 源中的 SSL 单元测试,以更深入地了解如何使用 SSL 传输设置 BrokerService 对象。
You should have a look at the documentation on the ActiveMQ website for using SSL. You need to setup the keystore and truststore appropriately so that client and server and negotiate over SSL to establish trust. You might want to also look at the SSL unit tests in the ActiveMQ source for some more insight into how to setup the BrokerService object with an SSL transport.