Resolving events not flowing to the JMS queue

If you observe that no events are flowing Kafka, the cause might be with the JMS queue. Check the DEF configuration, the status of the messaging engine, and the configuration of the Java™ Message Service (JMS) resources.

About this task

At run time, BPMN processes emit events in native JSON format by using the Dynamic Event Framework (DEF) mechanism.
  1. Events are sent to a dedicated JMS queue.
  2. These events are consumed by the BPMN event emitter.
  3. The BPMN event emitter formats them to raw events and sends them to Apache Kafka (or IBM® Event Streams).

When no events are flowing to Kafka, something might be wrong with the DEF or JMS configuration. Go through each configuration element in IBM Business Automation Workflow deployment environment.

Procedure

  1. Checking the DEF configuration.
  2. Checking the status of the messaging engine.
  3. Checking the configuration of the JMS resources.

Checking the DEF configuration

About this task

The defconfig.xml file holds the DEF configuration and must be present in the IBM Business Automation Workflow Deployment Manager profile at this location: <BAW_Install_Root>/profiles/DmgrProfile/config/cells/<CellName>.

The defconfig.xml file must also be synchronized, and therefore identical, on all BPM nodes: <BAW_Install_Root>/profiles/<NodeProfile>/config/cells/<CellName>

The default configuration for the DEF producer and listener in the defconfig.xml file must be similar to the following one.
<?xml version="1.0" encoding="UTF-8"?>
    <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:defconfig="http://www.ibm.com/websphere/appserver/schemas/8.5.5/defconfig.xmi">
      <defconfig:DefListenerConfig xmi:id="DefListenerConfig_1515663368939">
        <defListener xmi:id="DefListener_1515663369141" listenerId="jmsListenerOI" listenerFactoryId="com.ibm.bpm.def.JmsDefEventJSONListenerFactory">
          <filter xmi:id="DefFilter_1515663369447" appName="*" version="*" componentType="*" componentName="*" elementType="*" elementName="*" nature="*" filterId="jmsListenerOI_0"/>
          <defProperties xmi:id="DefProperty_1515663369230" name="JMS_QUEUE_JNDI" value="jms/monitorQueue"/>
          <defProperties xmi:id="DefProperty_1515663369277" name="JMS_QUEUE_CF_JNDI" value="jms/monitorcf"/>
          <defProperties xmi:id="DefProperty_1515663369339" name="JMS_AUTHENTICATION_ALIAS" value="CellAdminAlias"/>
        </defListener>
      </defconfig:DefListenerConfig>
      <defconfig:DefProducerConfig xmi:id="DefProducerConfig_1515663369875">
        <defProducer xmi:id="DefProducer_1515663370041" producerId="ProducerFor_jmsOI">
          <filter xmi:id="DefFilter_1515663370166" appName="*" version="*" componentType="*" componentName="*" elementType="*" elementName="*" nature="*" filterId="ProducerFor_jmsOI_0"/>
        </defProducer>
      </defconfig:DefProducerConfig>
    </xmi:XMI>

The default configuration specifies asterisks in the seven DEF event point keys for the JSON DEF listener and producer. You can provide custom subscription but in that case, you must ensure to provide the subscriptions for all the processes from which you are interested in getting events.

Procedure

  1. In the following script, replace the asterisk of the DEF event point keys in the subscriptions.
    <BAW_Install_Root>/BPM/Lombardi/tools/def/SampleConfigureJSONEventsToJMS.py
  2. Restart the configuration.
    <BAW_Install_Root>/BPM/Lombardi/tools/def/EnableBAI.py -u update subscriptions

    The event point key values must be the same in the JSON DEF listener and producer filter sections.

  3. Make sure to apply the filters that fit your needs.

    Otherwise, events that you expect might not be generated and fed to the JMS queue.

Checking the status of the messaging engine

Procedure

  1. In the WebSphere® Application Server administration console, navigate to Service Integration > Buses > busName.
  2. Under Topology, select Messaging engines.
    • The messaging engine must be present and started.
    • The SystemOut.log files of the cluster members must contain no error or indication that the messaging engine goes down without being restarted.

Checking the configuration of the JMS resources

Procedure

  1. Check the Queue resource.
    1. Navigate to Resources > JMS > Queues at the cell scope.
    2. Make sure that a queue is defined with a JNDI name that matches the value of the JMS_QUEUE_JNDI DEF property name for the JMS JSON listener in the DEF configuration.
  2. Check the Queue connection factory resource.
    1. Navigate to Resources > JMS > Queue connection factories at the cell scope.
    2. Make sure that the queue connection factory is defined with a JNDI name that matches the value of the JMS_QUEUE_CF_JNDI DEF property name for the JMS JSON listener in the DEF configuration.
  3. Check the Activity specification resource.
    1. Navigate to Resources > JMS > Activity specifications at the cell scope.
    2. Make sure that an activity specification is defined with a JDNI name that matches the Message Driven Bean listener bindings of the BPMN event emitter application.
  4. Check the Destination resource on the SI-Bus.
    1. Navigate to System Integration > Buses > busName > Destinations.
    2. Make sure that a destination exists with type Queue and with a name that matches the destination specified in the Queue resource.
  5. Check the JMS authentication alias credentials.
    1. Navigate to Security > Global security > Java Authentication and Authorization Service > J2C authentication data.
    2. Make sure that the values that are specified in the queue connection factory match with the values in the defconfig.xml for the JMS_AUTHENTICATION_ALIAS DEF property name.