[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: message expiry
timfox
do-not-reply at jboss.com
Thu Nov 27 07:19:22 EST 2008
A few comments on the latest commit:
1) Why do we need
| if (ref.getMessage().getExpiration() != 0)
| {
| expiringMessageReferences.addIfAbsent(ref);
| }
|
In method queueimpl::addlistfirst?
AddListFirst happens at rollback in which case the ref should already be in that set
2) QueueImpl:expireMessages. Why loop through the set twice - this can be done in a single iteration
3) don't type the LHS as a ConcurrentHashSet -bad practice
| private final ConcurrentHashSet<MessageReference> expiringMessageReferences = new ConcurrentHashSet<MessageReference>();
|
4) If MessageExpiryRunner is put in postoffice (which seems a more natural place for it) then you don't need to add the getQueues method to PostOffice,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192751#4192751
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192751
More information about the jboss-dev-forums
mailing list