Set classpaths required for WLST from MW_HOME/wlserver_10.3/server/bin/
. ./setWLSEnv.sh
start WLST by typing
java weblogic.WLST
connect('weblogic', 'welcome1', 't3://localhost:7001')
serverRuntime()
cd('/JMSRuntime/<TargetServerName>.jms/JMSServers/<JMSServerName>/Destinations/<JMSModuleName>!<QueueName>')
{ex.- wls:/fmw_domain/serverRuntime>cd('/JMSRuntime/AdminServer.jms/JMSServers/JMSServer1/Destinations/SystemModule1!Queue1')
}
cmo.deleteMessages('')
{This command delete all messaged in queue and will return the number of messages deleted.}
If you want to delete a particular message from the queue, use below command:
here is the message ID which we can get from "summary of JMS Message" from Admin Console.