Using a message listener port to publish the event XML to a topic

To use a message listener port to publish the event XML to a topic, you indicate a topic string, create resources, including a message listener port, and update the IBM_WBM_EMITTER SERVICE application to use the message listener port.

About this task

When you follow the steps, the following resources are created.
Type of resource Example resource name or value
WebSphere MQ Queue manager MQQmgr
TCP listener 1414 (port number)
Server-connection channel ServerConnChannel
Local queue AppEventQ
WebSphere® Application Server JMS topic connection factory (WebSphere MQ messaging provider) MQTCF (JNDI: jms/eventemitter/tcf)
JMS topic (WebSphere MQ messaging provider) MQTopic (JNDI: jms/eventemitter/topic)
Message listener port EventEmitterTopicListener

Procedure

  1. Check for the queue manager listener port and create a server-connection channel and a local queue:
    1. In the WebSphere MQ Explorer, click the queue manager. Open the Advanced folder and click the Listeners folder to check for the TCP listener. Note the port number. By default, a TCP listener is created when a queue manager is created. If no TCP listener exists, you can create one and specify a port number for it by right-clicking the Listeners folder, clicking New, and selecting TCP Listener.
    2. In the WebSphere MQ Explorer, click the queue manager. Open the Advanced folder. Right-click the Channels folder, click New, and select Server-Connection Channel. Enter a name for the channel and click Finish. Note the channel name.
    3. In the WebSphere MQ Explorer, click the queue manager. Right-click the Queues folder, click New, and select Local Queue. Enter a name for the queue (such as AppEventQ) and click Finish. Note the queue name. This queue is where applications put their event XML.
  2. Create a JMS topic connection factory using the WebSphere MQ messaging provider:
    1. In the WebSphere Application Server administrative console, select Resources > JMS > Topic connection factories. Select a scope and click New. Select WebSphere MQ messaging provider as the JMS resource provider, and then click OK.
    2. In step 1 of the wizard, enter the name and the JNDI name. For example, the name could be MQTCF and the JNDI name could be jms/eventemitter/tcf.
    3. In step 2 of the wizard, select the default connection method Enter all the required information into this wizard. In step 2.1, enter the queue manager name, for example MQQmgr. In step 2.2, enter the connection information. Select Client as the transport type and enter the host name of the machine that hosts the queue manager, the port number of the TCP listener that you noted in step 1a, and the name of the server-connection channel that you created in step 1b.
    4. In step 3 of the wizard, click Test Connection to verify that all the information is correct and you have a successful test connection.
    5. To complete the setting and save the configuration, click Next and Finish.
  3. Create a JMS topic using the WebSphere MQ messaging provider:
    1. In the administrative console, select Resources > JMS > Topics. Select a scope and click New. Select WebSphere MQ messaging provider as the JMS resource provider, and then click OK.
    2. In the Configuration panel, enter the name and the JNDI name for the queue. For example, the name could be MQTopic and the JNDI name could be jms/eventemitter/topic. In the Topic name field, enter a topic string, such as TestTopic.
  4. Create a message listener port using the JMS topic connection factory and JMS topic that you created:
    1. In the administrative console, select Servers > Server Types > WebSphere application servers and click the target server (for stand-alone server, the default name is server1) in the list.
    2. In the Configuration tab, under Communications, select Messaging > Message listener service.
    3. Click Listener Ports and click New. Enter a name for the message listener, such as EventEmitterTopicListener. Enter the JNDI name of the JMS queue connection factory that you entered in step 2b, for example jms/eventemitter/tcf and the JNDI name for the queue destination that you entered in step 3b, for example jms/eventemitter/topic.
    4. Click Apply and Save.
  5. Update the resources of the IBM_WBM_EMITTER SERVICE application to use the JMS activation specification that you created:
    1. In the administrative console, select Applications > Application Types > WebSphere enterprise applications and click IBM_WBM_EMITTER_SERVICE.
    2. In the Configuration tab, under Enterprise JavaBeans Properties, click Message Driven Bean listener bindings.
    3. In the Listener Bindings column, select Listener Port and enter the name of the message listener port that you created in step 4c, such as EventEmitterTopicListener.
    4. Click OK and save the change.
  6. Restart the IBM® Business Monitor server.

Results

You have finished the configuration. If applications put event XML onto the local WebSphere MQ queue, the JMS event emitter service wraps the XML in a Common Base Events envelope and sends it to the common event infrastructure (CEI) server for the IBM Business Monitor server to process.

What to do next

Optional: To verify that the configuration is working, send a test message to the local WebSphere MQ queue.
  • In the WebSphere MQ Explorer, right-click the Topics folder and select Test Publication.
  • In the Publish Test Message wizard, enter the topic name that you used (such as TestTopic) in the Topic string field and put some XML data into the Message data field.
The JMS event emitter service has successfully retrieved the message from the WebSphere MQ queue, wrapped it into the xs:any slot in a Common Base Event, and sent it out to the CEI server.