[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Paging discussion:

clebert.suconic@jboss.com do-not-reply at jboss.com
Tue Aug 19 11:23:47 EDT 2008


I have added some size controlling per Address on the PostOffice.

Whenever a message is routed, I'm adding the getEncodeSize() of the message to the PostOffice, and when the message is develiered I'm subtracting the queue size on the PostOffice.

When the size hits the minimal size I set the address in page mode, and after that moment all the messages are being sent to the page instead of routing.

To perform the "when the message is delivered" control, I am adding the reference counting logic. When the counter==0 on the ACK of the message, I'm calling a method on the postOffice informing that the message was delivered and that method is subtracting the encode size of the address. If the size < watermark I start a depage thread.

The address will be in page mode until all the page files are consumed, and at that point the Address comes back to its regular state automatically. (There is a startPaging method on PagingManager, and there is no stopPaging method. The "stopPaging" event happens when everything is dequeued).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171304#4171304

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171304



More information about the jboss-dev-forums mailing list