Introduction to Java Message Service (JMS)
JMS describes a common API for messaging products. It offers a unified way of sending and receiving asynchronous messages for Java™ programs. JMS distinguishes the point-to-point and publish and subscribe messaging model. In this article, you concentrate on the point-to-point model. The current version of the JMS API is 1.1.
The JMS provider is the messaging system that implements the JMS API. A JMS client is a Java program that uses the JMS API to send or receive messages via the JMS provider. The JMS messages are the exchanged message objects. They consist of a standard header, optional properties that can be added to the header and the body. The following message types are defined:
- TextMessage
- StreamMessage
- BytesMessage
The ConnectionFactory and Destinations are the standard JMS objects that are provided to the JMS client. References to these administered objects are stored in the JNDI namespace. The ConnectionFactory is needed for setting up a connection from a JMS client to a JMS provider. In the point-to-point model a destination is a references to one of the provider's message queues.
Figure 1. The JMS architecture
For further details about the JMS architecture, please refer to the JMS specification V1.1 and the J2EE 1.4 tutorial (see Resources).
JMS messages in WebSphere Partner Gateway
For the IBM® WebSphere® Partner Gateway's integration with other back-end systems via JMS, two packaging types are recommended:
- None
- Backend Integration
None package sends and receives only the raw messages without any further header information beside the standard JMS headers. The Backend Integration package adds JMS properties to the header of outbound messages. For inbound messages, the seven important properties are defined as mandatory by the Backend Integration package. The following table lists these required properties that are useful for the further processing by another backend system:
Table 1. The required JMS properties in the Backend Integration package
| JMS property name | Description |
|---|---|
| x_aux_sender_id | Identification of the message sender (in most cases the DUNS number). |
| x_aux_receiver_id | Identification of the message receiver (in most cases the DUNS number). |
| x_aux_protocol | Message content protocol. |
| x_aux_protocol_version | Version of the message content protocol. |
| x_aux_process_type | Message type |
| x_aux_process_version | Version of the message type |
| x_aux_system_msg_id | Unique identifier for duplicate checking |
For further details about the WebSphere Partner Gateway's backend integration via JMS, please refer to the IBM WebSphere Partner Gateway Enterprise and Advanced Editions: Integration Guide (see Resources).

