IBM Support

Pausing message consumption

Technical Blog Post


Abstract

Pausing message consumption

Body

There are times when you may want to delete all messages from the continuous queue quickly, without using the Message Reprocessing application.  This could be due to a large number (thousands pehaps) of error messages in the queue that will not need to be processed. 

Certain steps need to be followed to ensure that your messages are cleared from Maximo as well as from the WebSphere JMS queue. 

 

A problem arises when you attempt to delete messages from the JMS queue from within the WebSphere console while messages are in-flight.  This means that they are not visible to the consumer that deletes the messages because they are being proccessed by Maximo's MDB and therefore do not get deleted.  The process that was previously available to remove messages from the continuous JMS queue involved commenting out the MDBs in Maximo's ejb-jar.xml and ibm-ejb-jar-bnd.xmi to disable them, rebuilding and redeploying the maximo.ear or stopping the Maximo application while leaving the application server up.

The above methods stopped message consumption but was not a reasonable way to remove these messages.

 

WebSphere application server now provides a mechanism to pause message consumption to allow you to remove all messages from the queue.  It is important to note however that deleting messages from the queue is only part of the process.  Below are the steps to clear messages from the continuous queue:

 

1.  Log into the WebSphere console and navigate to:

 

Applications > application types > WebSphere Enterprise Applications

 

2.  Select the application hosting the MDBs (i.e. MAXIMOMIF)

 

3.  Click on the Runtime tab (note this is only available to those applications that have MDBs deployed, otherwise the Runtime tab will not show up)

 

4.  On the right, select "manage message endpoints"

 

5.  Select all message endpoints in the list, and click the "pause" button

 

The status icon shows all message endpoints have been paused

 

6.  Now navigate to Service Integration/buses and click on your bus (i.e. intjmsbus)

 

7.  On the right, click "Destinations", and select the CQINBD destination

 

8.  On the right side of the screen, select "queue points"

 

9.  Click on the queue point that shows messages you want to clear

 

10.  Select the Runtime tab.  On the right side of the screen, select "messages"

 

11.  Click the "Delete all" button

 

12.The next step is to follow steps 1 to 5, only this time, select all message endpoints and click the "resume" button.

 

The last step is to clear the following two tables in the Maximo database.  Using a sql editor or other tool, truncate the following two tables:

 

truncate table maxinterror

truncate table maxinterrormsg

 

This will delete all records from the error tables.  If there are any valid errors remaining in any of your queues such as other queues that we did not clear, they will reappear in these tables the next time they are processed by Maximo.

 

 

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11113999