Message Image  

Integration API based script to report message flows attached to WLM policy

 View Only
Mon July 13, 2020 05:44 AM

Workload Management (WLM) policies can be used for administration of the message flows to control the message rate of the message flows. WLM policy can be created either by using web user interface or command line. Once the policies are created they need to be attached to the message flow needing it.

For elaborate details please visit Workload Management Policy

If the customer’s scenario includes hundreds of message flows, there may be a need to report the message flows attached to the WLM policy. This requirement can easily be addressed using the Integration API.

Here is an example code that generates an xml file reporting the message flows with the WLM policy attached:

public class mqsireportwlmpolicy {

 public static void main(String[] args) {

 try{

   if (args.length == 0){

      System.out.println("No argurments specified \nUsage : mqsireportwlmpolicy 

The image below shows the integration node “93BRK” with two integration servers “default” and “embed” with the flows deployed.

pic

There are four WLM policies created on 93BRK and they are attached to message flows as below:

  1. SOAPService – MyPolicy
  2. SOAP – NewPolicy
  3. HTTPFlow – TestPolicy
  4. httpflow (on embed) – MyPolicy
  5. httpflow (on default) – OneMorePolicy

 

When the above “mqsireportwlmpolicy” script is executed as: java mqsireportwlmpolicy 93BRK

an xml file “wlmpolicy.xml” is created which shows the output:

pic1

This script can be further enhanced to meet the following requirements:

  1. To report only the message flows attached to particular WLM policy.
  2. To check if the particular WLM policy is defined on the integration node.
  3. To delete the WLM policy only if it is not attached to any message flows.

#IntegrationBus(IIB)
#workload-management-policy
#integration-api