Introduction
What is IBM MQ?
IBM MQ is a family of message-oriented middleware products that IBM launched in December 1993. It was originally called MQSeries, and was renamed WebSphere MQ in 2002 to join the suite of WebSphere products. In April 2014, it was renamed IBM MQ. IBM MQ supports the exchange of information between applications, systems, services and files by sending and receiving message data via messaging queues. This simplifies the creation and maintenance of business applications.
What is SAP CI(BTP-IS)?
Cloud Integration(BTP-IS) is a set of services and tools provided by SAP on its cloud-based Business Technology Platform (BTP) to enable integration between different systems, applications, and data sources. The key benefit of CI(BTP IS) is that it enables organizations to quickly and easily integrate their systems, data, and applications without the need for extensive coding or custom development. This helps to streamline business processes, reduce costs, and improve operational efficiency.
How IBM MQ can be integrated?
IBM MQ provides the messaging and queuing capabilities across multiple modes of operation: point-to-point ; publish/subscribe. IBM MQ has the Queue Managers(QM) in which different types of queues will be created. The QM can be connected directly or using client channel definition table or using a intermediate queue manager. All these will be associated with the channels which provides the in and out movement of the data from the Queues. Along with Queues we can have Topics also which can work with pub-sub approach. Rest APIS, JMS and MFTs can also be leveraged with the IBM MQ package installation.
How CI integrates with IBM MQ?
The integration between CI and IBM MQ can be best done using the AMQP 1.0 protocol. There are 7.5,8.0,9.0,9.1,9.2,9.3 versions of IBM MQ installations available in the market today. Out of which only 9.2 and above versions can support the integration between CI and IBM MQ.
The Queues on IBM MQ can be connected from CI and the Topics which can be published can also be subscribed from CI using AMQP protocol.
Note: Among the possible integrations with IBM MQ, Message Queues Integration using the AMQP protocol will be explained in detail.
Integration of SAP CI(BTP IS) with IBM MQ through AMQP
Prerequisites:
- Any IBM MQ server with version 9.2 and above. For Demo purpose using the trial IBM MQ from https://www.ibm.biz/ibmmqtrial.
- SAP Cloud Connector with required roles to connect IS tenant and IBM MQ
- SAP BTP IS Tenant Access with required CI roles.
Step-1: Install the IBM MQ 9.2 from the downloaded setup file
Select all the features and install them along with the MQ Explorer
Once installed successfully open the IBM MQ Explorer which should open as below
Step-2: Create the new Queue Manager (QM1)under the left side Queue Managers Pane
Step-3: Create the new Queue (Q2) under the left side Queue Managers (QM1)
Step-4: Create the new AMQP channel under the left side Queue Manager (QM1)
While Creating the AMQP channel provide the port as 5672 and start the channel. There will be a default AMQP channel which comes along with the installation stop it and use our configured AMQP channel. This is for the reason of handling the queues explicitly.
Step-5: Configure the Virtual Mapping to IBM MQ Internal System in Cloud Connector
Make sure the cloud connector is already connected successfully to the SAP BTP subaccount.
The backend type should be “NON-SAP System” and the protocol should be “TCP” only
Use the same port (5672) in system mapping which was given in the AMQP channel in IBM MQ and internal host on which the IBM MQ is installed and remaining virtual details as required.
Check the result of the reachable status on the internal host and port
Step-6: Test the connectivity from SAP Integration Suite to Cloud Connector.
The location ID (TESTCC) is the same name which was given during the connection between cloud connector and SAP BTP subaccount.
Step-7: Test the connectivity from SAP Integration Suite to IBM MQ through AMQP
The virtual host and virtual port which was given during system mapping in cloud connector should be used along with the same location id.
Step-8: Deploy the SASL username/password of IBM MQ in IS Security Material
Step-9: Create an IFLOW to send the message to the IBM MQ queue using AMQP channel
Provide the virtual host and port details along with the Location ID as tested earlier.
The credential name should be from the deployed security material.
Provide the destination type as Queue and use the same queue (Q2) created in IBM MQ
For testing purpose providing the sample message in the Content Modifier as below.
Step-10: Create an IFLOW to read the message from the IBM MQ queue using AMQP channel
Provide the virtual host and port details along with the Location ID as tested earlier.
The credential name should be from the deployed security material.
For testing purpose storing the payload read from IBM MQ queue (Q2) using groovy script
Monitoring the Messages in CI
Monitoring the Messages in IBM MQ
Before Execution:
After Execution:
Conclusion:
AMQP which is used mostly for Event Broker topics pub-sub can also be used for the exchanging of messaging queues data which provides a tight integration between CI and IBM MQ.
If the data in the IBM MQ TOPICS to be stored and retrieved then similar configurations to be done considering the pub-sub approach of the Topics using AMQP protocol itself.