Developer Guide for Solace JMS API
The PubSub+ Messaging API for JMS uses the standard JMS interface to provide JMS service for Java-based applications through a PubSub+ event broker. For information about version support in the PubSub+ JMS API, see Supported Environments.
To use the Solace JMS implementation in a Java Platform, Enterprise Edition (Java EE) application server environment, you can deploy a Solace provided, Java Connector Architecture (JCA) 1.5-compliant resource adapter for the particular Application Server platform being used to provide enterprise applications with connectivity to event brokers. Solace currently provides a Resource Adapter for Red Hat JBoss EAP 6.2 and WebSphere Application Server V8 (with Java 1.8 installed).
Using JMS
Solace Java Message Service (JMS) allows Java applications to access event brokers using the standard JMS API. JMS provides a common way for Java programs to create, send, receive, and read an enterprise messaging system's messages. For detailed information on JMS, see the JMS specification.
Solace JMS is comprised of the following components:
- Solace PubSub+ event broker network
- Java Naming and Directory Interface (JNDI) administration
- JMS API
- Solace CLI and SolAdmin
The core of Solace JMS, the Solace PubSub+ network acts as the JMS provider. It provides message routing, selecting / filtering, and access control.
The event broker provides clients with event broker binding and JNDI lookup service. Solace PubSub+ also supports JNDI lookups of administered objects maintained in an LDAP-based JNDI store on a remote host.
The Solace JMS API implementation uses the standard JMS interface to provide JMS service for Java-based applications through an event broker network.
The Solace CLI and SolAdmin allow you to make administrative changes to the JMS provider (in this case, an event broker in the network). Through the Solace CLI and SolAdmin you can create JMS objects representing network clients and connections, and automatically store this information in the JNDI lookup service on the event broker that is used by JMS client applications.
JMS Concepts
If you haven't used JMS and Solace PubSub+ together before, you might want to look at the JMS section of the Overview: How Apps Interact with PubSub+ Messaging Components page. It'll take you on a tour of the PubSub+ event broker's messaging components, and explain at a high level how they make data move from producers to the broker, and from the broker to consumers, with JMS.
JMS Entities
You can create the following JMS entities through the Solace CLI or SolAdmin:
- Connection Factories
- JMS Topics
- Subscription Names
- JMS Queues
A Connection Factory is a network object that provides the information required for client applications to create connections with a JMS provider. The default SolConnectionFactory
or a SolXAConnectionFactory
objects provide predefined default Connection Factory properties. These defaults may be modified.
A JMS topic is a JMS-managed object that client applications can subscribe to and publish to in a JMS publish and subscribe (pub/sub) messaging domain. Both durable and temporary JMS topics are supported.
You can create and manage durable JMS topics through the Solace CLI and SolAdmin, but you can only view active temporary JMS topics. Temporary JMS topics are unique JMS topics that are created at the Session level by JMS applications.
A durable subscription identified with a unique name must be provisioned on the event broker for clients to consume messages with a specific JMS topic. A durable subscription serves as a target for a topic and attracts messages that are published to that topic. Multiple subscribers can receive messages for a JMS topic using individual durable subscriptions. For information on creating subscriptions on the event broker, see Configuring Topic Endpoints.
JMS topics are bound to durable subscriptions when the client connects with the event broker (although a durable subscription can serve many JMS topics, only one JMS topic can be served at a time). The binding relationship is set by the Message Consumer created by the client application. For more information, refer to the JMS API Reference documentation.
A JMS Queue is a network object that the client application uses to specify the destination of messages that it is sending and the source of messages it receives. Queues are the destination objects used in a JMS Point‑to‑Point (PTP) messaging domain. A Queue is a destination to which a MessageProducer can send messages.
Both durable and temporary JMS Queues are supported. You can create and manage durable JMS Queues through the Solace CLI and SolAdmin, but you can only view active temporary Queues. Temporary JMS Queues are unique JMS Queues that are created at the Session level by JMS applications.
Configuration Information
- JMS/JNDI Administrators
For information on how to work with JNDI objects on event brokers, see Solace JNDI Objects.