Code and Compile Guidelines

To begin working with the standard Solace JMS API, import the required packages: com.solacesystems.jms.*;

The Solace JMS API requires the use of standard Java distribution 1.8 or greater.

The JMS sample applications include a sample Ant build script that shows how to include Solace libraries on the CLASSPATH during the compiler invocation.

Ensure that the CLASSPATH set when invoking the javac compiler includes all the .jar files in the lib directory.

When developing applications that use Solace JMS, you should the information in the sections below.

Secure Connections and Authentication

The following requirements must be met to successfully code and compile an application that will use TLS/SSL client connections, client certificate authentication, or Kerberos authentication schemes.

Java 1.8 or later provides the required Java Secure Socket Extension (JSSE) APIs that are required to use Transport Layer Security (TLS)/ Secure Sockets Layer (SSL) encrypted connections to the event broker.

Kerberos Libraries

If your application will use a Kerberos client authentication scheme, the Kerberos libraries in the JVM are used by default. However, if you are using an OS other than Windows, you can use Kerberos libraries other than those provided by the JVM, if you add the following system properties. In this case, the Kerberos libraries in the default OS library directory will be used.

You can also add the following system property to provide the path to Kerberos libraries located in a location other than the default OS library directory:<file path to Kerberos library>


The Solace JMS API uses Jarkarta Commons Logging to support different logging frameworks. Solace JMS applications can choose either log4j or java.util.logging as their logging framework.

With log4j, the directory in which the file and log4j jar file exist is on the classpath. A sample setup is shown below:

Including log4j.jar without on the classpath impacts program performance.

# Log4j configuration properties used 
log4j.appender.A1.layout.ConversionPattern=%d %-5p [%c] %m%n
# Second appender is set by default to level
# Categories
log4j.additivity=false, A1, A1, A1

Supported JMSX Properties

Solace JMS supports the following JMS‑defined (JMSX) properties.

Publishing client applications can set these properties in a message and consuming client applications can read those properties from a message.

Supported JMSX Properties

Property Type Use



The identity of the message group the message is part of.



The sequence number of the message within a group; the first message is 1, the second 2, on so on.



The identity of the client sending the message.

Note: The JMSXUserID property is only available when using basic client authentication and if the jmsx-user-id-enabled Connection Factory property is enabled.