SAP recently introduced the IBM MQ adapter for SAP Integration Suite, offering an ideal solution for customers using IBM MQ.
This adapter enables fast, reliable integration of IBM MQ into business processes. Organizations can seamlessly connect data from various sources to the IBM MQ platform, streamlining operations and significantly reducing the effort required to design and implement integration workflows.
What is IBM MQ?
IBM MQ is a secure and reliable messaging tool that helps different applications, systems, services, and files to communicate with each other by sending messages through queues. It accelerates connections to IBM MQ and simplifies sharing of business data across different platforms.
Key Features
The IBM MQ Adapter provides the following key features:
- Supports multiple API versions for connecting to the IBM MQ server.
- Supports IBM MQ on-premise and cloud.
- Allows read with the sender adapter and read, delete, and write with the receiver adapter.
- Allows multiple post-processing options.
- Provides secure authentication with option of Basic and Token-based authentication.
- Allows dynamic value assignment using exchange headers and properties.
How does the Adapter Work?
The IBM MQ adapter is available as part of your SAP Integration Suite license.To use the adapter, you must first add it to your Integration Flow, add the required Connection parameters, and configure it as per your Processing requirements.
Once you have configured the IBM MQ adapter, the SAP CI tenant enables data exchange at runtime by sending a request to the IBM MQ receiver system. Finally, after processing this request, IBM MQ sends back the required data to SAP.
Let's look at a simple operation to write a message to IBM MQ using the IBM MQ Receiver Adapter for SAP Integration Suite. Similarly, we will demo the IBM MQ Sender Adapter for SAP Integration Suite to perform read and subsequently delete a message from the queue.
Write a message using an IBM MQ Receiver Adapter
In the IBM MQ Receiver system, we can set up a queue specifically for write operations. The setup involves initializing the IBM MQ Receiver Adapter with connection details such as the Address, Queue Manager Name, and Queue Name which are explained in below sections. Then the adapter establishes a connection to the queue and writes the message to it using the Write operation.
Prepare Details in Content Modifier
In SAP Cloud Integration, Message Header, you can use a content modifier to prepare details and that is required for Publishing an event.
Action
|
Name
|
Source Type
|
Source Value
|
Create
|
csrfToken
|
Constant
|
fG4mN8sQ1tZpR9wK2vL3yX
|
Create
|
corrld
|
Constant
|
-
|
Create
|
credentialName
|
Constant
|
IBM_MQ_Cloud
|
Create
|
locationld
|
Constant
|
Locid-07
|
Create
|
addressValue
|
Constant
|
http://ibmmq:445
|
How to Connect the IBM MQ Receiver Adapter?
Parameter
|
Values
|
Address
|
Set as http://ibmmq:445[AK5]
|
Authentication
|
Select the authentication as Basic.
|
Credential Name
|
Set as IBM_MQ_Cloud.
|
Proxy Type
|
Select the proxy type as On-Premise
|
Location ID
|
Set as Locid-07.
|
Reuse connection
|
Enable this property if you want to reuse the connection.
|
Connection Timeout (in ms)
|
Set as 60000.
|
Response Timeout (in ms)
|
Set as 60000.
|
Execute Write operation using the IBM MQ Adapter Receiver Adapter
To perform the Write operation, specify the API version and provide the Queue Manager Name which is used to uniquely identify each instance of a queue manager within your network. Further, Queue Name identifies individual queues within the queue manager. You can specify MQ CSRF Token to ensure that any actions or requests are coming from authorized users.
Additional details like MQ Correlation ID helps you to associate messages with specific tasks or transactions and Message Expiry specifies the duration for which the message exists in the queue. Message persistence ensures messages survive system failures.
Parameter
|
Values
|
Operation
|
Select the Write operation.
|
API Version
|
Select an API Version.
|
Queue Manager Name
|
Set as MQD32.
|
Queue Name
|
Set as DocQueue.
|
Content Type
|
Select the parameter content type as Application/JSON.
|
MQ CSRF Token
|
Set value as fG4mN8sQ1tZpR9wK2vL3yX
|
MQ Correlation ID
|
Set value as 8a4c3e2d1f7089bce5d4abd2c9a8e7b6d3f28c5b6a7f9d0e.
|
Message Expiry
|
Set as 10.
|
Message Persistence
|
Select Non-Persistence from the dropdown.
|
Read a message using an IBM MQ Sender Adapter
Before we begin, it is assumed that message-type records are available in IBM MQ for querying. Our example illustrates how the IBM MQ Sender Adapterallows querying to read a message and delete it after reading.

How to Connect to IBM MQ Sender Adapter?
Parameter
|
Values
|
Address
|
Set as http://ibmmq:445
|
Authentication
|
Select the type of authentication as Basic.
|
Credential Name
|
Set as IBM_MQ_Cloud.
|
Proxy Type
|
Select the proxy type as Internet.
|
Polling Interval (in ms)
|
Set as 60000.
|
Reuse connection
|
Select this property if you want to reuse the connection.
|
Connection Timeout (in ms)
|
Set as 60000.
|
Response Timeout (in ms)
|
Set as 60000.
|
Read a Message using IBM MQ Adapter Sender Adapter
While reading the message, use the IBM MQ Sender adapter. Ensure that you specify the API version and Queue Manager Name, Queue Name. Select the Processing mode as Read and Delete from the dropdown. Additionally, define the Maximum Number of Messages Per Node for determining the maximum number of messages to be retrieved per node.
Optional parameters can also be provided if available, such as the MQ CSRF Token to ensure that any actions or requests are indeed coming from authenticated and authorized users.
Parameter
|
Values
|
API Version
|
Select an API Version V3.
|
Queue Manager Name
|
Set as MQD32.
|
Queue Name
|
Set as DocQueue.
|
Processing Mode
|
Select the Read and Delete Message from the dropdown.
|
Max Number of Messages Per Node
|
Set as 10.
|
MQ CSRF Token
|
Set value as fG4mN8sQ1tZpR9wK2vL3yX.
|
Quick Links
For detailed information about IBM MQ adapter configuration, see IBM MQ Adapter Guide.
For detailed information about IBM MQ adapter, see IBM MQ Adapter for SAP Integration Suite.
Note: The IBM MQ adapter is available as part of your SAP Integration Suite license.