JMS protocols :
Fig.3 JMS Messaging Models
Many JMS implementations provide both the messaging models, but the specification defines compliance for each messaging style separately.
Point-To-Point Messaging:
Characteristics:
Publish-Subscribe Messaging:
Characteristics:
Advantages
Considering the advantages of the JMS, we can see how important the JMS adapter is, for integration in SAP Exchange Infrastructure.
JMS adapter in XI
Adapters enable different systems to communicate with each other. In XI, adapters enable the Integration Engine and the Partner Connectivity Kit (PCK) to communicate with different applications/messaging systems.
There are various adapters that are used in XI like File adapter, Idoc adapter, JDBC adapter, RFC adapter and so on. Here, I have mentioned only the JMS adapter as the topic deals with JMS.
Fig.4 As illustrated above, the JMS adapter exchanges JMS messages with the JMS messaging system.
Prerequisites
In order to use the JMS adapter, we need to first install the relevant JMS driver. The required Java libraries are product-specific and must be obtained from either the product vendor or other providers. Following installation, we must deploy the Java libraries on the J2EE server so that the JMS adapter can access the required Java classes at runtime. If we are using MQSeries 53x.xxx, we must enter the following JAR files in aii_af_jmsproviderlib.sda.
Integration:
We configure the adapter in the configuration part - Integration Directory of the Integration Builder/PCK in XI. In the adapter configuration, we specify whether an adapter is located at the inbound channel (sender adapter) or at the outbound channel (receiver adapter) of the PCK.
Features:
Similarly, this configuration is done while defining the communication channel (receiver channel) in the Integration Server, under the Parameters tab page.
Receiver adapters that run on the Adapter Engine support system acknowledgments if they are requested by the sender. Acknowledgements are triggered when a message is successfully processed by the adapter or if an error occurs while it is being processed. Receiver adapters do not support application acknowledgments.
For the detailed steps, please refer receiver JMS adapter .
Module Processor
We can enhance the functionality of the adapters that is configured in the communication channel (both in inbound and outbound) by defining generic modules. If it is not possible to add modules to an adapter, we will not be able to select the Module tab page. To configure modules for the JMS adapter, we can check out JMS adapter modules .
JMS Correlation ID : A correlation ID can be defined as a unique identifier that correlates the request message and its reply. The sender sends a message to a receiver and also requests for a reply message. In this scenario, the sender assigns a unique identifier to the request that is different from those for all other currently outstanding requests. The receiver receives this message and saves the identifier. When the receiver replies to the message by sending a response, it adds the request's identifier to the reply. This way the correlation ID is used to match the reply message to the request message. The correlation ID is usually put in the header of a message as the ID is not a part of the data being transmitted between the sender and the receiver.
There is a new parameter in JMS adapter now. There is an option of saving the JMS correlation ID of the request in the receiver JMS adapter. In the sender adapter, one can then set the XI conversation ID to the saved JMS correlation ID of the request. This makes the additional parameters that were required in previous Support Packages obsolete. However, the configuration settings that were made prior to SP7 are still valid.
I believe that this blog is helpful specially who are new to JMS and heading forward to use JMS adapter in SAP XI.