activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Darfler (JIRA)" <>
Subject [jira] Commented: (AMQ-1112) remove expired messages from Store and update Message cursors
Date Sat, 16 May 2009 01:32:51 GMT


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:]:
    for arg in sys.argv[1:]:

> remove expired messages from Store and update Message cursors
> -------------------------------------------------------------
>                 Key: AMQ-1112
>                 URL:
>             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.

View raw message