[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Pre-calculate flow control credits for large messages (Repost)
clebert.suconic@jboss.com
do-not-reply at jboss.com
Sat Jun 20 16:34:33 EDT 2009
"timfox" wrote : When delivering large messages there is code that pre-calculates flow control credits - can you remind me why this is necessary?
That is something you requested.
As we send packets to the client, the client may be sending credits back to the server. You were concerned about the ServerConsumer overusing the channel and hence you requested to take credits in advance.
anonymous wrote :
| Also, can you remind me how pendingLargeMessagesCounter can ever be > 1
I think it could be replaced by an AtomicBoolean. But I would need to make a few tests.
anonymous wrote : Can you also explain this comment:
|
| // We are supposed to finish largeMessageDeliverer, or use all the possible credits before we return this
| // method.
| // If we play the commands on a different order than how they were generated on the live node, we will
| // eventually still be running this largeMessage before the next message come, what would reject messages
| // from the cluster
I have simplified the comment as:
// We need to deliver the largeMessage on backup also, exactly as done on the live node.
// In case of failure the same packets will be available for resume sending.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4238888#4238888
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4238888
More information about the jboss-dev-forums
mailing list