{"id":3690,"date":"2014-11-03T14:36:13","date_gmt":"2014-11-03T06:36:13","guid":{"rendered":"http:\/\/rmohan.com\/?p=3690"},"modified":"2014-11-03T14:38:04","modified_gmt":"2014-11-03T06:38:04","slug":"clean-messaging-queue-using-jython","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=3690","title":{"rendered":"clean messaging queue using jython"},"content":{"rendered":"<p>Objective for yesterday: Clean Persistent messages from JMS queue.<\/p>\n<p>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.<\/p>\n<p>First of all localize wsadmin tool on your host. It is located in <install_root>\/AppServer\/bin<\/p>\n<p>cd <install_root>\/AppServer\/bin<\/p>\n<p>Create new file called cleanJMSQueue.py on your host machine with the following content. [Remember to replace variables with appropriate values matching your environment]<\/p>\n<p>objName = AdminControl.makeObjectName(&#8216;WebSphere:type=SIBQueuePoint,SIBMessagingEngine=MyNode.MyServer-MyBus,name=MyQueueName,*&#8217;)<br \/>\nqps = AdminControl.queryNames_jmx(objName, None)<br \/>\nqp = qps[0]<br \/>\nAdminControl.invoke_jmx(qp, &#8216;deleteAllQueuedMessages&#8217;, [java.lang.Boolean(&#8216;false&#8217;)], [&#8216;java.lang.Boolean&#8217;])<\/p>\n<p>Start wsadmin tool to connect to deployment manager and execute script<\/p>\n<p>wsadmin.sh -host <dmgr_server> -port <dmgr_SOAP_port> -conntype SOAP -username <admin_username> -password <admin_password> -lang jython -f <location_cleanJMSQueue.py><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Objective for yesterday: Clean Persistent messages from JMS queue.<\/p>\n<p>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.<\/p>\n<p>First of all localize wsadmin tool on your host. It is located in \/AppServer\/bin<\/p>\n<p>cd \/AppServer\/bin<\/p>\n<p>Create new file [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3690"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3690"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3690\/revisions"}],"predecessor-version":[{"id":3691,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3690\/revisions\/3691"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}