App Connect

 View Only
  • 1.  Topic string for event monitoring using an independent Integration Server

    Posted Fri June 14, 2024 09:48 AM

    Can someone please post an example of a topic string that they have defined for configuring event monitoring for an independent IS.

    I've tried various combinations based on the info given at https://www.ibm.com/docs/en/app-connect/12.0?topic=events-subscribing-event-message-topics:

    but I can't get any messages sent to the queue defined in the topic.

    The user trace shows that the msgs are definitely being emitted:

    2024-06-14 10:09:42.614584    34896  UserTrace   BIP4074I: The event filter on the event emitted by event source 'KafkaProducer.terminal.in' in flow 'xxx' has been evaluated and returned 'TRUE'. The query text was 'true()'. 
    The event filter, which controls whether an event is emitted, has been evaluated for event source 'KafkaProducer.terminal.in' in flow 'xxx'.  
    The result of the evaluation was 'TRUE'.  
    The query text evaluated was 'true()'. 
    No action is required.  This message is for information. 
    2024-06-14 10:09:42.614844    34896  UserTrace   BIP3919I: Message flow 'xxx' emitted a monitoring event of type 'KafkaProducer.InTerminal' from node 'KafkaProducer'. The message was not coordinated with any unit of work. 
    The message flow emitted a monitoring event that is immediately available to the monitoring application, even if a long-running unit of work is in progress. 
    No action is required.

    I've tried:

    $SYS/Broker/integration_server/Monitoring/+/+/+

    $SYS/Broker/integration_server/Monitoring/#/#/#

    $SYS/Broker/integration_server/Monitoring/TEST_SERVER/#

    /integration_server/Monitoring/#/#/#

    /integration_server/Monitoring/+/+/#

    /integration_server/Monitoring/TEST_SERVER/#

    topicRoot/integration_server/Monitoring/#/#/#

    topicRoot/integration_server/Monitoring/+/+/+

    topicRoot/integration_server/Monitoring/TEST_SERVER/#



    ------------------------------
    Peter Von Hirschfeld
    ------------------------------



  • 2.  RE: Topic string for event monitoring using an independent Integration Server

    Posted Mon June 17, 2024 03:21 AM

    I consume the Monitoring Events in my Java Spring code successfully like this:

    @Component
    public class MonitoringEvents {
    
        @JmsListener(id = "moniEvents", destination = "$SYS/Broker/+/Monitoring/#", containerFactory = "moniFactory")
        private void storeMonitoringEvent(JAXBElement<Event> eventJaxb) throws JAXBException {
            Event event = eventJaxb.getValue();
    ...
        }
    
        @Bean
        private SimpleJmsListenerContainerFactory moniFactory(ConnectionFactory connectionFactory, Jaxb2Marshaller marshaller) {
            SimpleJmsListenerContainerFactory factory = new SimpleJmsListenerContainerFactory();
            factory.setConnectionFactory(connectionFactory);
            factory.setMessageConverter(new MarshallingMessageConverter(marshaller));
            factory.setPubSubDomain(true);
            return factory;
        }
    ....

    Here another successful use case when I do Durable Subscriptions in IBM:

    define topic(MY.TOPIC) +

           topicstr('$SYS/Broker/integration_server/Monitoring') +

           defpsist(YES) dursub(YES) pub(ENABLED) sub(ENABLED)

    define sub(MY.SUB) +

           topicstr('$SYS/Broker/+/Monitoring/#') +

           dest(MY.QUEUE) wschema(TOPIC)

    Can you show your code how you subscribe to the topic?

    I had issues in the past in when for example using a shell script to subscribe and that causes problems with the "$SYS" in the topic string.



    ------------------------------
    Daniel Steinmann
    ------------------------------



  • 3.  RE: Topic string for event monitoring using an independent Integration Server

    Posted Wed June 26, 2024 07:00 AM

    Hi Peter,

    Can you try this topic string

    $SYS/Broker/+/MonitoringEvents/#

    Thanks



    ------------------------------
    uvaise odam
    ------------------------------



  • 4.  RE: Topic string for event monitoring using an independent Integration Server

    Posted Thu June 27, 2024 04:54 AM

    Hi Uvaise

    Thanks for the suggestion.

    I tried this, but I don't get any messages written to the queue defined in the subscription. 

    The trace just shows that the event is being emitted (see initial post above), but the Status field for that subscription still shows 0 message count:



    ------------------------------
    Peter Von Hirschfeld
    ------------------------------



  • 5.  RE: Topic string for event monitoring using an independent Integration Server

    Posted Thu June 27, 2024 06:44 AM

    Hi Peter,

    Please check you have below configurations in place.

    MQ Configurations:

    1. Local queue for receiving the message
    2. Topic object with correct Topic string (as I have given in my previous reply)
    3. Subscription object mapped to above topic object and local queue is assigned in "Destination name" of subscription object
    4. Server connection channel (default or user-defined) 

    App Connect Configurations in server.conf.yaml:

    1. Enable BusinessEvents

          

     BusinessEvents: # Monitoring events
        MQ:
          policy: '{MQEventLogPolicy}:MQCCDT'                # Specify a {policy project}:policy if not using  'defaultQueueManager'
          enabled: true            # Set true or false, default false
          format: ''                # Set string or none
          outputFormat: 'json'       # Set comma separated list of one or more of : json,xml. Defaults to 'xml'
          publishRetryInterval: 0   # Set the retry interval (in milliseconds), to pause all publications and retry, when publication failures are causing serious delay to the transaction.

    2. Enable MonitoringEvents

    Monitoring:
      MessageFlow:
        publicationOn: 'active'         # choose 1 of : active|inactive, default inactive
                                           # Ensure Events.BusinessEvents.MQ|MQTT is set
        eventFormat: 'MonitoringEventV2'  # When BusinessEvents.-.outputFormat is xml set MonitoringEventV2 or WMB, default MonitoringEventV2

    3. Optional - Verify MQ Connection details in Policy project

    4. Event configured on the nodes such as HTTP Input node, ESQL node etc

    5. Restart the integration server (independent IS)

    It should work if you have all above configurations.

    Thanks



    ------------------------------
    uvaise odam
    ------------------------------



  • 6.  RE: Topic string for event monitoring using an independent Integration Server

    Posted Mon July 01, 2024 05:11 AM

    Hi Uvaise

    I got it working. My infrastructure definitions were incomplete. The topic string was correct.

    Interesting that the trace showed the event as being emitted, even though the infrastructure was unable to pick up the message and forward it to the defined queue.

    Thanks for your help.

    Peter



    ------------------------------
    Peter Von Hirschfeld
    ------------------------------