I'm not sure why you would want to do thi, could you explain your use case.
also see http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/usermanual-2.0.0.beta3/html_single/index.html#duplicate-detection
In my use case, I would like to detect duplicated user messages within user session time _window, meaning:
1. Client AB sends an asynchrone message about user AB to my application that willpersisted it to queue
2. If my application fails to ACK back in 15 seconds then the same message will be sent again.
3. I use the duplicated message detection that JBM offer and configure the id_cache_size.
4. I build a message ID from (userID and messageBody(10 chars))
5. More than 15 min later (old session to time out) the same client is allowed to send the same user message with the same body.
6. JBM duplicated message detection will ignore the message as it found similar one in the cache.
Thereâ€™s none common between the same user messages except that itâ€™s sent after the old session times out, thatâ€™s why I was looking if thereâ€™s a way to clean the message_detection cache of messagesIDs after a predefined time_window.