activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <>
Subject [jira] Commented: (AMQ-1112) remove expired messages from Store and update Message cursors
Date Thu, 09 Apr 2009 14:00:37 GMT


Gary Tully commented on AMQ-1112:

just fyi I am highlighting the workaround from the post linked above.
{quote}In the end I implemented a workaround that was simply a thread that periodically cleared
my queues of expired messages. The way it did so was to use a MessageConsumer and use a JMSSelector
to consume only those messages that had expired. I don't believe the consumer itself actually
ever receives any messages, but the act of looking for them causes ActiveMQ to expunge the
expired messages.

                MessageConsumer c = sess.createConsumer(dest, "JMSExpiration < " + System.currentTimeMillis());
                Message m = c.receiveNoWait();
                if (m != null) log.error("Returned an expired message");

> 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