To establish an SSL connection with self-signed certificates when connecting to ActiveMQ "Classic", follow these steps:
keytool -genkey -alias broker -keyalg RSA -keystore broker.ks -validity 365
keytool -export -alias broker -file broker.crt -keystore broker.ks
keytool -import -alias broker -file broker.crt -keystore client.ts
<sslContext>
<sslContext keyStore="broker.ks" keyStorePassword="password" trustStore="broker.ts" trustStorePassword="password" />
</sslContext>
<transportConnector name="ssl" uri="ssl://localhost:61617" />
Note: Replace "localhost" and "61617" with the appropriate values for your environment.
ActiveMQSslConnectionFactory connectionFactory = new ActiveMQSslConnectionFactory();
connectionFactory.setBrokerURL("ssl://localhost:61617");
connectionFactory.setTrustStore("broker.ts");
connectionFactory.setTrustStorePassword("password");
Connection connection = connectionFactory.createConnection();
connection.start();
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-05-18 11:00:00 +0000
Seen: 8 times
Last updated: Jun 02 '22
What are the Cordapp Certificates used for in terms of signing and interacting?
How can SSL be used with CqlSessionFactoryBean in Springboot Cassandra?
How to set up Database First configuration in Entity Framework 7 for MVC 6?
How can I address the issue of Content Security Policy blocking more than I had anticipated?
How do I resolve a 502 error when attempting to call an HTTPS REST API from an HTTP REST API?
What does borrowing or moving a value from `stdout` mean?