Integration Server - IBM Websphere MQ – Universal Messaging End To End Integration
Tags: integration, webmethods, esb, mqadapter
Published: 2023-03-31 10:53:05

---
title: Integration Server - IBM Websphere MQ – Universal Messaging End To End Integration
published: true
date: 2023-02-28 10:42:23 UTC
tags: integration, webmethods, esb, mqadapter
canonical_url: https://tech.forums.softwareag.com/t/integration-server-ibm-websphere-mq-universal-messaging-end-to-end-integration/275300/1
---

### Authors: Rima Barman, Ujjwal Kumar

## Introduction

This article details the steps on creating integration using IBM WebSphere MQ, Integration Server and Universal Messaging. Using IBM WebSphere MQ, the user should be able to configure connections to MQ queues, listeners and notification documents. Listener will listen to the MQ queue, picks message and sends to the notification document. The notification document is pointing to UM. The IS trigger linked to notification document processes/enriches and sends messages to UM. IS consumes the enriched message or processes further.

**Actors**

- Any Developer with basic knowledge on IBM WebSphere MQ, Integration Server, Universal Messaging, Adapters and Designer
- Any Customer with basic knowledge on IBM WebSphere MQ, Integration Server, Universal Messaging, Adapters and Designer

**Supported Versions**

IS & UM 10.5 and above.

## Prerequisites

1. Setup:  
a. Two Integration Servers (IS1, IS2)  
b. Two Universal Messaging Realm Servers (UM1, UM2)  
c. Two webMethods WebSphere MQ Adapters in IS1 and IS2 respectively

2. Install IBM WebSphere MQ and configure it

3. Install WebSphere MQ Adapter along with Integration Server and Universal Messaging using Software AG Installer in IS1 and IS2

4. Install the latest fixes

5. Add the below MQ jars in the IS classpath of IS1 and IS2 (IntegrationServer//packages/WmMQAdapter/code/jars/) to test functionality with WebSphere MQ JMS provider.  
a. com.ibm.mq.headers.jar  
b. com.ibm.mq.jmqi.jar  
c. com.ibm.mqjms.jar  
d. dhbcore.jar  
e. fscontext.jar  
f. providerutil.jar

6. Start servers IBM WebSphere MQ, Universal Messaging and Integration Server

## Data Flow of the Scenario

In this Integration scenario, message is sent from Integration Server1 to MQ Inbound queue through put adapter service using an active MQ Inbound connection. The MQ Inbound queue has a listener and an adapter notification document attached to it. The moment message is put to MQ Inbound, The listener, which is active, picks message from the MQ Inbound and sends it to the active inbound notification. The Notification which is pointing to Universal Messaging Server1 will send the message to UM1. At this moment, IS triggers a flow service to process and enrich the message and put the processed message to MQ Outbound. Then the active outbound listener listening to the outbound MQ will pick the message and sends to UM2 using active outbound notification. At this moment, The IS trigger of the Integration Server2 will fire which calls a service that reads the processed message. This message can be sent to a file or process further.

[![MicrosoftTeams-image (15)](https://global.discourse-cdn.com/techcommunity/optimized/3X/8/d/8d057a7d8749d73fa75430c5a905fd01b0b3e2c6_2_690x376.png)](https://global.discourse-cdn.com/techcommunity/original/3X/8/d/8d057a7d8749d73fa75430c5a905fd01b0b3e2c6.png "MicrosoftTeams-image (15)")

## Configurations

### IBM WebSphere MQ Configuration

IBM MQ (formerly WebSphere MQ and MQSeries) is a messaging middleware. The following components needs to be created in MQ server to integrate with Integration Server, Universal Messaging and execute this scenario.

Open IBM MQ Explorer to create the following required configuration parameters to connect from Integration Server.

1. MQ Queue Manager  

a. Create a new Queue Manager by right-clicking on Queue Manger > New > Queue Manager  

b. Enter the Queue Manager name and click on the Next button.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/4/f/4f4c6e52224e4f121f1cf7296bdb25b5a5af6214_2_690x429.png)](https://global.discourse-cdn.com/techcommunity/original/3X/4/f/4f4c6e52224e4f121f1cf7296bdb25b5a5af6214.png "image")

c. Enter Listener Port number in in the field “Listen on Port Number” and click on finish button.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/b/3/b327b52e57c6f4080f38fb88eb3c8ba01deb3a29_2_690x476.png)](https://global.discourse-cdn.com/techcommunity/original/3X/b/3/b327b52e57c6f4080f38fb88eb3c8ba01deb3a29.png "image")

2.Server-Connection Channel  

a. Create a new Server-Connection Channel under the Queue Manager by right clicking on Channels > New > Server-Connection Channel  

b. Fill in the details and click on finish button (e.g., conn\_Channel\_01).

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/8/f/8f097f71da477df9f8b3a800d5b5277baf867945_2_653x500.png)](https://global.discourse-cdn.com/techcommunity/original/3X/8/f/8f097f71da477df9f8b3a800d5b5277baf867945.png "image")

3.MQ Inbound and Outbound queues for messaging  

a. Create MQ Inbound queue under the Queue Manager by right clicking on Queues → New ->Local Queue  

b. Fill in the name and click on finish button. e.g., Inbound\_Queue\_01

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/e/2/e2c798010feafc65b4c3dac361687937b192cf34_2_681x500.png)](https://global.discourse-cdn.com/techcommunity/original/3X/e/2/e2c798010feafc65b4c3dac361687937b192cf34.png "image")

c. Create MQ Outbound queue e.g., Outbound\_Queue\_01 by following same steps.

### IS and Adapter Configurations

One IS package should be created in Designer to configure the MQ Adapter in Integration Server. It should have folders adapters, connections, listeners, notifications, services and triggers e.g., MQ\_BVT\_01 (IS package name)

![image](https://global.discourse-cdn.com/techcommunity/original/3X/d/1/d1d596a0461fddfc5d5c542da8da363f791178ea.png)

### UM and IS Configurations

a) Create UM JNDI Connection Factory in UM Enterprise Manager e.g., EventFactory  
b) Create two UM Queues e.g., JMS\_Queue\_01 in UM1 and JMS\_Queue\_02 in UM2

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/a/c/ac939c9a91aa37026abb28654d71ed129b053a01_2_690x354.png)](https://global.discourse-cdn.com/techcommunity/original/3X/a/c/ac939c9a91aa37026abb28654d71ed129b053a01.png "image")

**Update/Create IS Configurations for JMS in IS1 and IS2**  
a. Switch to IS Administration Page → Messaging.  
b. Edit JNDI Provider Alias and update the Provider URL and save it (nsp://:) and test it.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/6/a/6a8cdbc8f696d494e340d596541db71249113767_2_690x403.png)](https://global.discourse-cdn.com/techcommunity/original/3X/6/a/6a8cdbc8f696d494e340d596541db71249113767.png "image")

c. Update JMS Connection Alias in JMS Settings and add new UM JNDI Connection factory e.g. EventFactory to it and save this.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/c/6/c6787827ac66703f45a60debbf3ba37174c73291_2_690x357.png)](https://global.discourse-cdn.com/techcommunity/original/3X/c/6/c6787827ac66703f45a60debbf3ba37174c73291.png "image")

d. Enable Default IS JMS Connection Alias

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/1/4/1470dba9b1617850036e04fbda4924d8bfb88105_2_690x89.png)](https://global.discourse-cdn.com/techcommunity/original/3X/1/4/1470dba9b1617850036e04fbda4924d8bfb88105.png "image")

## Complete Scenario

### 1. Create two MQ Adapter Connections

Adapter connections enable WebSphere MQ Adapter to connect to WebSphere MQ queues. Create two new Adapter connections by selecting the connection type as WebSphere MQ Connection and enable it.  
a. Inbound\_Connection\_01  
b. Outbound\_Connection\_02

Steps to create the Adapter connections:  
• Switch to IS1 Administration UI-> Adapters → WebSphere MQ Adapter Page  
• Select Connections tab and create a new Inbound Connection (Inbound\_Connection\_01) by selecting “Configure New Connections”, save it and enable it.  
• Follow the same steps to create the Outbound connection (Outbound\_Connection\_01) in IS2

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/8/b/8b45b244c82354bea972592fd76208f4d2849fd4_2_593x500.png)](https://global.discourse-cdn.com/techcommunity/original/3X/8/b/8b45b244c82354bea972592fd76208f4d2849fd4.png "image")

#### 2. Create two MQ Adapter listeners
An adapter listener monitors the queue for messages and passes the messages to a listener notification. When a listener detects a message in a queue, the listener performs a Get/Put operation to retrieve the message and passes the message to the listener notification. 

Create two new Adapter listeners:  
a. Inbound\_Listener\_01  
b. Outbound\_Listener\_02

Steps to create the Adapter listeners:  
• Switch to the WebSphere MQ Adapter Administration Page of IS1  
• Select the Listeners tab and create a new Inbound listener (Inbound\_Listener\_01) by selecting “Configure New Listener” → WebSphere MQ Single-Queue Listener  
• Save the listener and enable it.  
• Follow the same steps to create the Outbound listener (Outbound\_Listener\_01) in IS2

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/8/b/8b3c5f6dfae92870bd1f1b52f0303a03b0b15cf8_2_690x378.png)](https://global.discourse-cdn.com/techcommunity/original/3X/8/b/8b3c5f6dfae92870bd1f1b52f0303a03b0b15cf8.png "image")

#### 3. Create two MQ Adapter listener notifications 
A listener notification works in conjunction with a listener to filter and process messages in WebSphere MQ Adapter. 

Create two new Adapter listener notifications:  
a. Inbound\_Notification\_01  
b. Outbound\_Notification\_02

Steps to create the Adapter listeners notifications:  
• Switch to Designer  
• Move to project MQ\_BVT\_01 and right click on notifications folder and select → New → Adapter Notification. Enter name as “Inbound\_Notification\_01”  
• Select adapter type as WebSphere MQ Adapter → WebSphere MQ Asynchronous Listener Notification → Inbound\_Listener\_01 → Inbound\_Notification\_01PublishDocument  
• Click on the Finish button  
• Switch to WebSphere MQ Adapter Administration Page and enable this notification  
• Open the Adapter Settings property of the document and set properties for JMS using UM as mentioned below

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/7/e/7e152905cad6257e53100a6288323fec43afce23_2_690x372.png)](https://global.discourse-cdn.com/techcommunity/original/3X/7/e/7e152905cad6257e53100a6288323fec43afce23.png "image")
  
• Follow the same steps to create the Outbound notification (Outbound\_Notification\_01) in IS2

#### 4. Create Inbound Put Adapter Service
This Adapter service Inbound\_Put\_01 will be responsible to put messages to the inbound queue configured under the selected connection.

Create the new Adapter service Inbound\_Put\_01.

Steps to create this service:  
• Switch to Software AG Designer and open package MQ\_BVT\_01  
• Right click on folder notifications → New → Adapter Notification  
• Fill in the details and click Next button.

![image](https://global.discourse-cdn.com/techcommunity/original/3X/6/2/624eda8133f35e901408fcd95faab90ba748cc1e.png)  
• Select adapter type as WebSphere MQ Adapter and click on Next button.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/8/b/8b63b9a794dda6b4a10bb5fc7dce0fe1c4fd3c08_2_690x215.png)](https://global.discourse-cdn.com/techcommunity/original/3X/8/b/8b63b9a794dda6b4a10bb5fc7dce0fe1c4fd3c08.png "image")
  
• Select template as WebSphere MQ Asynchronous Listener Notification and click on Next button.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/1/0/10a1f133744e8823a186a8130c4d2f1085626a2b_2_690x241.png)](https://global.discourse-cdn.com/techcommunity/original/3X/1/0/10a1f133744e8823a186a8130c4d2f1085626a2b.png "image")
  
• Select listener as Inbound\_Listener\_01 and click on Next button.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/d/9/d910114ee7e7ed86f7865574ad4c93fa970ed7dc_2_690x212.png)](https://global.discourse-cdn.com/techcommunity/original/3X/d/9/d910114ee7e7ed86f7865574ad4c93fa970ed7dc.png "image")
  
• Check notification document name and click on Finish button.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/5/f/5f91e6b05530a928dc4e4278b5e4cfaca7df5754_2_690x208.png)](https://global.discourse-cdn.com/techcommunity/original/3X/5/f/5f91e6b05530a928dc4e4278b5e4cfaca7df5754.png "image")

• To enable the new listener notification document, switch back to the Integration Server WebSphere MQ Adapter page. Click on Listener Notification Tab. Enable the listener notification Inbound\_Notification\_01

#### 5. Create Outbound Put Adapter Service
This Adapter service Outbound\_Put\_01 should be created in designer inside newly created package (ref. MQ\_BVT\_01 ) created by following same steps as point 4. 
#### 6. Create IS (flow) services
 a. put\_MessageToInbound\_01 in MQ\_BVT\_01 under the services folder. It invokes the adapter service created in point 4.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/e/9/e9afa07c6cddfbc8df2b5b0d8c75d2e47e6cae1f_2_690x328.png)](https://global.discourse-cdn.com/techcommunity/original/3X/e/9/e9afa07c6cddfbc8df2b5b0d8c75d2e47e6cae1f.png "image")

b. **publishJmsMsgToMQInboundAndUM** \_02 will invoke the flow service that invokes Adapter service mentioned in point 6. This IS service will generate the main flow of this scenario.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/3/3/33ca1463d368c87b209bdbaa25cda1bb167464e1_2_690x303.png)](https://global.discourse-cdn.com/techcommunity/original/3X/3/3/33ca1463d368c87b209bdbaa25cda1bb167464e1.png "image")

c. **processJmsInboundAndPutToMQOutbound** will enrich the incoming message from MQ Inbound and put it to MQ Outbound

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/9/8/9847c5371d6e97c572d3b09aee23811b51001bb4_2_690x273.png)](https://global.discourse-cdn.com/techcommunity/original/3X/9/8/9847c5371d6e97c572d3b09aee23811b51001bb4.png "image")

d. **processJmsOutboundAndWriteToFile** will process the incoming message from MQ Outbound and writes to a file

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/1/a/1a6a8f5cb72c3f76ad379f1a70ff989d55ffea29_2_690x484.png)](https://global.discourse-cdn.com/techcommunity/original/3X/1/a/1a6a8f5cb72c3f76ad379f1a70ff989d55ffea29.png "image")

e. Create JMS triggers in triggers folder pointing to respective MQ notification documents.

1. ISToUMPubMQInboundTrigger ->Inbound\_Notification\_01PublishDocument in IS1
2. MQOutboundToFileTrigger → Outbound\_Notification\_01PublishDocument in IS2

f. Execute the flow service responsible (publishJmsMsgToMQInboundAndUM) to put message to MQ Inbound (step 6 b.)

Now here the data flow will be as follows:  
MQ Inbound Queue >> MQ Inbound Listener >> UM Inbound >> Enrich Message >> MQ Outbound Queue >> MQ Outbound Listener >> UM Outbound >> IS Outbound Processing service

## Summary & Next Steps

In this scenario, we had integrated WebSphere MQ Adapter with Integration Server and Universal Messaging. We were able to transfer messages from one Integration Server to an MQ server after which the messages were passed to UM and then enriched via IS service. The IS service then puts this message to another MQ whose listener will send this message to Outbound UM. This outbound can be received by the second IS or can be sent for further processing.  
We can have similar scenarios like:

 - Using IS Local Connection instead of JMS  
 - Using webMethods (Native) Messaging instead of JMS  
 - Transferring files as streams and recovering them Outbound MQ

 

[Read full topic](https://tech.forums.softwareag.com/t/integration-server-ibm-websphere-mq-universal-messaging-end-to-end-integration/275300/1)