Using a message listener port to put the event XML into a WebSphere MQ queue

To use a message listener port to put the event XML into a WebSphere MQ queue, you create resources, including a message listener port, and update the IBM_WBM_EMITTER SERVICE application to use the message listener port.

About this task

Note: The preferred method for sending an event XML from WebSphere MQ is to use a JMS activation specification, not a message listener port. Refer to "Using a JMS activation specification to put the event XML into a WebSphere MQ queue."
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 queue connection factory (WebSphere MQ messaging provider) MQQCF (JNDI: jms/eventemitter/qcf)
JMS queue (WebSphere MQ messaging provider) MQQueue (JNDI: jms/eventemitter/queue)
Message listener port EventEmitterQueueListener

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 queue connection factory using the WebSphere MQ messaging provider:
    1. In the WebSphere Application Server administrative console, select Resources > JMS > Queue connection factories. Select a Scope and click New. Select WebSphere MQ messaging provider as the JMS resource provider and click OK.
    2. In step 1 of the wizard, enter the name and the JNDI name. For example, the name could be MQQCF and the JNDI name could be jms/eventemitter/qcf.
    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 queue using the WebSphere MQ messaging provider:
    1. In the administrative console, select Resources > JMS > Queues. Select a scope and click New. Select WebSphere MQ messaging provider as the JMS resource provider and click OK.
    2. In the Configuration panel, enter the name and the JNDI name for the queue. For example, the name could be MQQueue and the JNDI name could be jms/eventemitter/queue. In the Queue name field, enter the WebSphere MQ queue name that you created in step 1c.
  4. Create a message listener port using the JMS queue connection factory and JMS queue 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 then click New. Enter a name for the message listener, such as EventEmitterQueueListener. Enter the JNDI name of the JMS queue connection factory that you entered in step 2b, for example jms/eventemitter/qcf, and the JNDI name for the queue destination that you entered in step 3b, for example jms/eventemitter/queue.
    4. Click Apply and Save.
  5. Update the resources of the IBM_WBM_EMITTER SERVICE application to use the message listener port 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 EventEmitterQueueListener.
    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. 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.