[ 
https://issues.apache.org/activemq/browse/AMQ-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51081#action_51081
 ] 

Gary Tully commented on AMQ-1112:
---------------------------------

Am guessing this jira is still open because the mechanism for expiry is non 
deterministic, It occurs on ack and on message dispatch but not independently. 
For example a message enqueue with no more work on the broker will not be 
removed when it expires. 
There needs to be a task that periodically checks and expriies messages 
independent of normal message processing.
Current behavior is that expired messages will not  be delivered to a consumer, 
but they remain till some destination activity occurs.

I imagine a destinationPolicy.expiryPeriod=60000 - which indicates that a task 
will fire every minute and iterate through the in memory messages and expiry 
any that warrent it.
Possilby there is another destinationPolicy,expireStoredMessages=true which 
indicates that the expiry task will iterate through the entire store to locate 
messages that have expired. there may even be a limit, 
destinationPolicy.expiryTaskDuration=500 that limits a task duration to some 
period.

In all these would make message expiry deterministic for a destination.


> 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.

Reply via email to