A simple client for Solace.
Client to connect with Solace using publish-subscribe or request-reply patterns.
It is necessary to have Apache Maven installed.
- Compile the project using Maven:
mvn package
- Execute the generated .jar with dependencies:
java -jar target/solace-client-jar-with-dependencies.jar
Option can be passed on the same line the program is executed as follows:
java -jar target/solace-client-jar-with-dependencies.jar 0 # JCSMP is chosen
java -jar target/solace-client-jar-with-dependencies.jar 0 c # JCSMP consumer is chosen
java -jar target/solace-client-jar-with-dependencies.jar 1 0 # Request/Reply requestor is chosen
Properties can be overwritten using the -D
as follows:
java -jar \
-Dsolace.topic_name='other.topic' \
-Dsolace.host='tcps://my.custom.domain:55443' \
-Dsolace.ssl.truststore='/path/to/my/truststore.jks' \
-Dsolace.ssl.truststore.password='my-secure-pass' \
target/solace-client-jar-with-dependencies.jar
The examples are based on Solace documentation: