Hi, in this post we are going to do some house keeping to WebSphere Messaging Engine. In some cases messages got stucked in committing or removing state (IBM calls them indoubt messages). When that happens, it is impossible to manage them via administration console.
Service Integration > Buses > xyzServiceBus > Messaging Engines > abcMEBus > Queue Points > queueA > Runtime > message > delete etc...
So we need to use wsadmin.sh and some commands. I always use the wsadmin.sh under the DMGR profile. So start the wsadmin.sh and connect to DMGR, type your username and password if your cell is secure. What we need first is to get the correct message id. Use below command;
$AdminControl invoke [$AdminControl queryNames type=SIBMessagingEngine,*] getPreparedTransactions
This will give us a very long string, expect something like
Did you get such an id? Good. Now we are going to use this id in another command.
$AdminControl invoke [$AdminControl queryNames type=SIBMessagingEngine,*] commitPreparedTransaction msgid
Do not use quoation or anything just paste the message id we got from previous command as a whole instead of where I wrote msgid in italic.
This will commit any stuck messages in any state, if this does not solve your problem we have another parameter for rolling back the message.
$AdminControl invoke [$AdminControl queryNames type=SIBMessagingEngine,*] rollbackPreparedTransaction msgid
This will rollback, but I usually don't need to use it, committing manually solves almost all stuck messages.
Have a nice debugging.