Skip to Content
Technical Articles
Author's profile photo Farooq Ahmed

Integration of SAP CI(BTP IS) with IBM MQ through AMQP

Integration of SAP CI(BTP IS) with IBM MQ through AMQP

 

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:

  1. Any IBM MQ server with version 9.2 and above. For Demo purpose using the trial IBM MQ from https://www.ibm.biz/ibmmqtrial.
  2. SAP Cloud Connector with required roles to connect IS tenant and IBM MQ
  3. 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

IBM%20MQ%20Setup%20File

IBM MQ Setup File

Once installed successfully open the IBM MQ Explorer which should open as below

IBM%20MQ%20Explorer

IBM MQ Explorer

Step-2: Create the new Queue Manager (QM1)under the left side Queue Managers Pane

Queue%20Manager

Queue Manager

Step-3: Create the new Queue (Q2) under the left side Queue Managers (QM1)

New%20Queue%20in%20the%20Queue%20Manager

New Queue in the Queue Manager

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.

AMQP%20Channel

AMQP Channel

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.

Cloud%20Connector%20Virtual%20Mapping

Cloud Connector Virtual Mapping

Check the result of the reachable status on the internal host and port

Test%20the%20Virtual%20Mapping

Test the Virtual Mapping

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.

Cloud%20Connector%20Connectivity%20Test%20from%20IS

Cloud Connector Connectivity Test from IS

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.

AMQP%20Connectivity%20Test%20from%20IS

AMQP Connectivity Test from IS

Step-8: Deploy the SASL username/password of IBM MQ in IS Security Material

SASL%20Credentials%20Deployed%20in%20Security%20Material

SASL Credentials Deployed in 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.

To%20IBM%20MQ%20Through%20AMQP

To IBM MQ Through AMQP

Provide the destination type as Queue and use the same queue (Q2) created in IBM MQ

Destination%20and%20Queue%20Details

Destination and Queue Details

For testing purpose providing the sample message in the Content Modifier as below.

Content%20Modifier%20with%20Message%20Body

Content Modifier with Message Body

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.

From%20IBM%20MQ%20through%20AMQP

From IBM MQ through AMQP

For testing purpose storing the payload read from IBM MQ queue (Q2) using groovy script

Queue%20Details%20to%20be%20processed

Queue Details to be processed

Monitoring the Messages in CI

CI%20Monitoring%20Dashboard

CI Monitoring Dashboard

Payload%20read%20from%20IBM%20MQ%20Queue

Payload read from IBM MQ Queue

Monitoring the Messages in IBM MQ

Before Execution:

Before%20Execution%20with%200%20read%20and%20write%20status

Before Execution with 0 read and write status

After Execution:

After%20Execution%20with%201%20received%20and%201%20sent%20status

After Execution with 1 received and 1 sent status

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.

At the time of migration from PI/PO to Integration Suite when the requirement to transfer the JMS scenarios connecting to IBM MQ should be done on CI then this blog provides the detail steps of initial configurations.

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.

Disclaimer:

This article is only for informational purpose that CI can be integrated with the IBM MQ also.

Only an integration of one method has been shown as an example but no limitations in any perspective.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.