Objective for yesterday: Clean Persistent messages from JMS queue.
There are few methods that will work depending on your messaging set-up. I ill show how to clean persistent messages from the queue using wsadmin and jython.
First of all localize wsadmin tool on your host. It is located in
cd
Create new file called cleanJMSQueue.py on your host machine with the following content. [Remember to replace variables with appropriate values matching your environment]
objName = AdminControl.makeObjectName(‘WebSphere:type=SIBQueuePoint,SIBMessagingEngine=MyNode.MyServer-MyBus,name=MyQueueName,*’)
qps = AdminControl.queryNames_jmx(objName, None)
qp = qps[0]
AdminControl.invoke_jmx(qp, ‘deleteAllQueuedMessages’, [java.lang.Boolean(‘false’)], [‘java.lang.Boolean’])
Start wsadmin tool to connect to deployment manager and execute script
wsadmin.sh -host
Recent Comments