[
https://issues.apache.org/activemq/browse/AMQ-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51726#action_51726
]
Benjamin Darfler commented on AMQ-1112:
---------------------------------------
I created a quick python script that hits the web ui, finds all the queues and
then browses each which causes any expired messages to actually be removed from
the queue. We put this as a cron job that runs every 5 min.
If you pass no arguments it looks at localhost otherwise you can pass in as
many host names as you want to hit.
I tried attaching it but no go so here is the source.
--------------------------------------------------------------------------------
#! /usr/bin/env python
import sys, urllib2, re
pattern = re.compile('browse.jsp\?JMSDestination=([a-zA-Z.]*)')
def expireMsgs(host='localhost'):
url = 'http://' + host + ':8161'
html = urllib2.urlopen(url + '/admin/queues.jsp').read()
for queue in set(pattern.findall(html)):
urllib2.urlopen(url + '/admin/browse.jsp?JMSDestination=' +
queue).read()
if not sys.argv[1:]:
expireMsgs()
else:
for arg in sys.argv[1:]:
expireMsgs(arg)
> remove expired messages from Store and update Message cursors
> -------------------------------------------------------------
>
> Key: AMQ-1112
> URL: https://issues.apache.org/activemq/browse/AMQ-1112
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.0.0
> Reporter: Rob Davies
> Assignee: Rob Davies
> Fix For: 5.3.0
>
>
> Ensure messages that are expired are removed from message store and message
> cursrors are also updated consistently
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.