This guide describes basic configuration to connect a HTTP-based messaging system to an IBM MQ System within a DataPower service. The handler implements HTTP transport connectivity on the client, which is the front end of the service. On the back end, the service employs IBM MQ URLs to determine the queue to which requests are forwarded and from which replies are pulled.
You can find more information about this topic on: Datapower Documentation
- IBM Datapower Physical Appliance/Virtual Machine/Docker Container (IDG.10.5.0.6)
- IBM MQ V9.X
- App Connect Enterprise 12.x with associated MQ
- There must be network connectivity between all components
- Ensure to have access to an IBM MQ Queue Manager V9+ in order to create the queues for the demo
- Execute the following commands in you IBM MQ environment to create the queues
runmqsc <QUEUE_MANAGER_MAME>
DEFINE QLOCAL('DP_IN') REPLACE
DEFINE QLOCAL('DP_OUT') REPLACE
EXIT
- This flow is the simulated backend for the MQ Service.
- Obtain the project interchage files from here if you want to review and change the flow that acts as a backend service for MQ. (Optional)
- Obtain the deployable ACE bar file from here to deploy the backend service to your ACE environment.
- The implemented flow has the following componentes.
- MQ Input: Acts as a listener for messages in the DP_IN queue
- Compute: Creates the response message and assigns the correlationID to the value of the messageID recieved, this is very important to allow Datapower to get the corresponding response message.
- MQ Output: Sends the response message to the DP_OUT queue
- Make sure you have a separate application domain (other than default)
- Look for "IBM MQ" in the search bar and select IBM MQ v9+ queue manager
- In the next screen click Add to create the new Queue Manager Connection
-
Configure the properties for the Queue Manager connection:
- Name (Required): The name of the object, in this case MYMQ
- Host (Required): The hostname and port of your MQ Server
- Queue manager name: The name of the Queue Manager
- Channel name: The name of the connection channel
- Alternate user: Off
- Units-of-work and backout: 0
- The rest of properties can be default
-
In the Connections and CSCI tabs leave default values
-
In the MQCSP Tab configure the username and password to connect to your MQ Server
-
Once completed Apply and Save all changes. The new Queue Manager object should be up and running.
- In the web console main page select Services and Multi-Protocol Gateway
- In the next screen click Add to create the new Multi-Protocol Gateway
- In the configuration tab, enter the name for the Multi-Protocol Gateway, choose the XML Manager default, in the Type select static-backend and in the Default property Bakend URL enter the URL of the queue manager, in this case idgmq://MYMQ,configure a Front Side Protocol to define the interface and port the service will be using.
-
Next click on + to create a new Multi-Protocol Gateway Style Policy
-
Create a new Client to Server rule with the following actions:
- A match rule to handle the requests of every context: *
- A gateway script action that configures the input and output queues for the bridge service: the file to be used is: config.js
-
Create a new Server to Client rule with the following actions:
- A match rule to handle the responses of every context: *
- A gateway script action to set the response headers for the http request: the file to be used is: config2.js
-
-
Once completed Apply and Save all changes.
-
Back in the Multi-Protocol Gateway configuration make sure that Response type and Request type is set to JSON
- Once completed Apply and Save all changes.
- Once the configuration is completed, the service testing can be made using any http method invocation tool using the address, port(Front Side Protocol Handler) and context configured.