java – ActiveMQ,SSL和传输连接器
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了java – ActiveMQ,SSL和传输连接器,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2591字,纯文字阅读大概需要4分钟。
内容图文
使用本网站作为指南:
http://activemq.apache.org/how-do-i-use-ssl.html
我执行了以下操作(我在esite中找到了一些keytool命令)
keytool -genkey -alias broker -keyalg RSA -keystore /home/amq/broker.ks -dname "CN=server, O=IBM, C=GB" -keypass passw0rd -storepass passw0rd
keytool -export -alias broker -keystore /home/amq/broker.ks -file /home/amq/broker_cert -storepass passw0rd
keytool -genkey -alias client -keyalg RSA -keystore /home/client/client.ks -dname "CN=client, O=IBM, C=GB" -keypass passw0rd -storepass passw0rd
keytool -import -alias broker -keystore /home/client/client.ts -file /home/amq/broker_cert -storepass passw0rd
keytool -export -alias client -keystore /home/client/client.ks -file /home/client/client_cert -storepass passw0rd
keytool -import -alias client -keystore /home/amq/broker.ts -file /home/client/client_cert -storepass passw0rd
现在创建了密钥库和信任库,我启动了代理
export SSL_OPTS=-Djavax.net.ssl.keyStore=/home/amq/broker.ks\ -Djavax.net.ssl.keyStorePassword=passw0rd\ -Djavax.net.ssl.trustStore=/home/amq/broker.ts
cd /usr/local/activemq/apache-activemq-5.9.0
bin/activemq console
到目前为止,一切都很好,我想要做的是采用随安装一起提供的ProducerTool.java,然后运行它.
我对文档有点神秘,如下所示
Using Spring to configure SSL for a Broker instance
Sometimes the use of javax.net.ssl.* system properties is not
appropriate as they effect all SSL users in a JVM. ActiveMQ 5.2.x adds
an element to the that allows a broker
specific set of SSL properties to be configured.The SslContext test case validates starting an SSL transport listener
using the configuration specified in the broker Xbean. The SslContext
element is added to the broker as follows:06002
The SslContext is used to configure the SslTransportFactory for that
broker. Full details of the configuration options available can be
seen in the schema definition or in the accessors of
org.apache.activemq.spring.SpringSslContext
我从中收集的是,因为我不关心所有JVM用户将被迫使用SSL,我很好,并且不需要任何Spring配置. (至少我希望如此)
我被2件事困扰
1 GT;我是否正确相信我不需要执行任何Spring配置,我可以简单地使用-Djava选项
2 – ;我也不认为我需要ssl传输连接器,我应该能够运行ProducerTool.java代码并且很好.为什么我会这么想,因为如果我需要将SSL传输连接器添加到额外配置??的borker,并且它强制更改源代码.
我在假设中是否正确
1 GT;我不需要任何Spring更改,因为我希望所有JVM用户都使用SSL
2 – ;我可以不使用ssl传输连接器,只使用ProducerTool.java,实际上使默认连接使用SSL?
谢谢
解决方法:
它是一个JMS客户端,所以无论哪种方式(无论是SSL传输还是不传输),客户端都将连接到端口61616,因为SSL传输配置为61616
但我无法从文件中看出运输是否是必需的
有任何想法吗
内容总结
以上是互联网集市为您收集整理的java – ActiveMQ,SSL和传输连接器全部内容,希望文章能够帮你解决java – ActiveMQ,SSL和传输连接器所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。