App Connect

 View Only

Configuring IBM App Connect Enterprise for publishing Operational and Business events to remote Queue manager in CP4I

By AMAR SHAH posted Fri May 12, 2023 09:58 AM

  

In this article we will see how to configure ACE integration server / Integration Runtime running in a container environment such as IBM Cloud Pak for Integration (CP4I) to emit Operational Events and Business events to an IBM MQ queue manager running in another container within the same Kubernetes (in our case CP4I) cluster.



We will require the following configurations for the purpose of demonstration.

  • Define monitoring events on the Integration Flow.
  • Enable publication of events on the Integration Server.
  • Define MQEndpoint Policy to connect to remote queue manager.
  • Define topics and subscriptions on Queue Manager.


Defining monitoring events on the Integration Flow

For demonstration purpose, we take a very simple message flow that receives an input message from an MQ queue and writes the data to another queue.



The business events like Monitoring events are configured on message flow such that the MQInput node emits Transaction Start and End events and MQOutput node emits the ‘In Terminal’ events.





Define MQEndpoint Policy to connect to remote queue manager

As we need to publish events to an MQ topic, we will need to create an MQEndpoint policy to define the details of remote queue manager.

There is already a blog post that describes how to define MQEndpoint policy for an remote queue manager running in CP4I. So we will just summarize the parameters here.

A policy project in ACE Toolkit and the MQEndpoint policy :




You can pass this policy project as a configuration at the time of deployment of an Integration Server or you can package this policy project in the BAR file along with the message flow application. In this demonstration we chose to package the policy project in the BAR file.

Enable publication of events on the Integration Server

Create a server.conf.yaml configuration with the details similar to below:

In the Events section of server.conf.yaml, specify the name of policy that we will be using to connect to remote queue manager. Set “enabled” to true and “format” to xml.

In this example, we have used a similar configuration that applies to both OperationEvents and BusinessEvents.

Under the Monitoring section, set publicationOn to active and eventFormat to MonitoringEventV2.

Events:
  OperationalEvents: # Messageflow Statistics
    MQ:
      policy: '{myMQPolicyProject}:MQEndpoint'
      enabled: true
      format: 'xml'
  BusinessEvents: # Monitoring events
    MQ:
      policy: '{myMQPolicyProject}:MQEndpoint'
      enabled: true
      format: ''  
      outputFormat: 'xml'
Monitoring:
  MessageFlow:
    publicationOn: 'active'
    eventFormat: 'MonitoringEventV2'
 
Statistics:
  Snapshot:
    publicationOn: 'active'     
    nodeDataLevel: 'basic'     
    outputFormat: 'json,xml'

For accounting and Statistics publication, set outputFormat to xml (or json, xml) and set publicationOn to active.

Define topics and subscriptions on Queue Manager

On the queue manager side, we will need to define following:

  • Local queues to store the published events
  • Topics
  • Subscriptions
  • SVRCONN Channel

Login to the webui of queue manager in your ocp cluster.

We will require queue to store the publication messages. So let’s create the local queues EVENTS and STATS.



Next, create topic on which Events from the message flow will be emitted. Use the ‘Events’ tab on the webui horizontal bar menu.



The topic strings required for various event types is described in ACE documentation at;

https://www.ibm.com/docs/en/app-connect/12.0?topic=events-subscribing-event-message-topics



Create an unmanaged subscription with destination queue as shown below



Similarly, create one for accounting and statistics topic and use destination queue as STATS.


Next, create a SVRCONN channel for ACE applications to be able to connect to the Queue manager.

Deploying and Testing the Integration Flow

Deploy the BAR file to the Integration Server. Remember to attach the server.conf.yaml configuration object that we described in above section to the IS.

Once the deployment is complete and message flow starts successfully, process one message through the messageflow. You should be able to see 3 monitoring event messages (Txn Start, Txn End and In Terminal) in the EVENTS queue on the queue manager.



As we have configured Accounting & Stats events as well, you should see one Statistics message published to STATS queue every 20 seconds.



Conclusion

We demonstrated how to configure Integration Server and Queue Manager running in CP4I for publishing Operation Events and Business Events.


#AppConnectEnterprise(ACE)
#IBMCloudPakforIntegration(ICP4I)

2 comments
90 views

Permalink

Comments

Thu June 01, 2023 07:37 AM

@Abu Davis The data published to MQ queues can be consumed by any custom applications.  Note that, ACE also provides option to publish data to ELK stack or to Instana if you have Instana sensors/agents installed on your system.

This particular article is focused on the usecase where user wants to consume XML format data from message queues using their custom applications.

Wed May 31, 2023 08:04 AM

How do you make sense of the data in the message queues? Is this similar to tracing functionality on Instana Monitoring?