NO-JIRA Fix broker connection AMQP SSL example

This commit is contained in:
Domenico Francesco Bruscino 2021-09-02 16:41:36 +02:00 committed by Gary Tully
parent c0ce3ffdc6
commit 00d353e4f1
12 changed files with 7 additions and 7 deletions

View File

@ -85,7 +85,7 @@ under the License.
<ignore>${noServer}</ignore>
<spawn>true</spawn>
<location>${basedir}/target/server1</location>
<testURI>tcp://localhost:5771?sslEnabled=true;trustStorePath=target/server1/etc/activemq.example.truststore;trustStorePassword=activemqexample</testURI>
<testURI>tcp://localhost:5771?sslEnabled=true;trustStorePath=target/server1/etc/server-ca-truststore.jks&amp;trustStorePassword=securepass</testURI>
<args>
<param>run</param>
</args>
@ -101,7 +101,7 @@ under the License.
<spawn>true</spawn>
<ignore>${noServer}</ignore>
<location>${basedir}/target/server0</location>
<testURI>tcp://localhost:5671?sslEnabled=true;trustStorePath=target/server0/etc/activemq.example.truststore;trustStorePassword=activemqexample</testURI>
<testURI>tcp://localhost:5671?sslEnabled=true;trustStorePath=target/server0/etc/server-ca-truststore.jks&amp;trustStorePassword=securepass</testURI>
<args>
<param>run</param>
</args>

View File

@ -35,7 +35,7 @@ public class BrokerConnectionSenderSSL {
public static void main(final String[] args) throws Exception {
Connection connectionOnServer0 = null;
ConnectionFactory connectionFactoryServer0 = new JmsConnectionFactory("amqps://localhost:5671?transport.trustStoreLocation=target/server0/etc/activemq.example.truststore&transport.trustStorePassword=activemqexample");
ConnectionFactory connectionFactoryServer0 = new JmsConnectionFactory("amqps://localhost:5671?transport.trustStoreLocation=target/server0/etc/server-ca-truststore.jks&transport.trustStorePassword=securepass");
// Step 1. Create a connection on server0, and send a few messages
try {
@ -58,7 +58,7 @@ public class BrokerConnectionSenderSSL {
// Step 2. create a connection on server1, and receive a few messages.
// the sender on the broker conneciton will take care of the transfer.
Connection connectionOnServer1 = null;
ConnectionFactory connectionFactoryServer1 = new JmsConnectionFactory("amqps://localhost:5771?transport.trustStoreLocation=target/server1/etc/activemq.example.truststore&transport.trustStorePassword=activemqexample");
ConnectionFactory connectionFactoryServer1 = new JmsConnectionFactory("amqps://localhost:5771?transport.trustStoreLocation=target/server0/etc/server-ca-truststore.jks&transport.trustStorePassword=securepass");
try {
connectionOnServer1 = connectionFactoryServer1.createConnection();

View File

@ -32,11 +32,11 @@ under the License.
<acceptors>
<!-- keystores will be found automatically if they are on the classpath -->
<!-- The CORE protocol only used for artemis-maven-plugin verifying the server is up for example to start -->
<acceptor name="netty-ssl-acceptor">tcp://localhost:5671?sslEnabled=true;keyStorePath=activemq.example.keystore;keyStorePassword=activemqexample;protocols=AMQP,CORE</acceptor>
<acceptor name="netty-ssl-acceptor">tcp://localhost:5671?sslEnabled=true;keyStorePath=server-keystore.jks;keyStorePassword=securepass;protocols=AMQP,CORE</acceptor>
</acceptors>
<broker-connections>
<amqp-connection uri="tcp://localhost:5771?sslEnabled=true;verifyHost=true;trustStorePath=activemq.example.truststore;trustStorePassword=activemqexample" name="otherBrokerSSL" retry-interval="1000">
<amqp-connection uri="tcp://localhost:5771?sslEnabled=true;verifyHost=true;trustStorePath=server-ca-truststore.jks;trustStorePassword=securepass" name="otherBrokerSSL" retry-interval="1000">
<sender address-match="#"/>
</amqp-connection>
</broker-connections>

View File

@ -32,7 +32,7 @@ under the License.
<acceptors>
<!-- keystores will be found automatically if they are on the classpath -->
<!-- The CORE protocol only used for artemis-maven-plugin verifying the server is up for example to start -->
<acceptor name="netty-ssl-acceptor">tcp://localhost:5771?sslEnabled=true;keyStorePath=activemq.example.keystore;keyStorePassword=activemqexample;protocols=AMQP,CORE</acceptor>
<acceptor name="netty-ssl-acceptor">tcp://localhost:5771?sslEnabled=true;keyStorePath=server-keystore.jks;keyStorePassword=securepass;protocols=AMQP,CORE</acceptor>
</acceptors>
<!-- Other config -->