[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Status of LargeMessages work
clebert.suconic@jboss.com
do-not-reply at jboss.com
Mon Oct 27 19:37:40 EDT 2008
VIII - When sending very large messages, I need to make sure the server will not overuse the remoting connection running out of memory, so I've changed the ServerSide flow control to use a Semaphore instead of a AtomicInt.
As the messages are chunked, I acquire the packetSize (or chunkSize) from availableCredits. When running out of credit ServerConsumerImpl will just wait until more credits are returned from the client.
As far as I can see, in regular cases Semaphore is as performant as AtomicInteger (look at the JDK implementation/ Sync class). And as I needed the chunk to wait on the credits I have made this change for now.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184982#4184982
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4184982
More information about the jboss-dev-forums
mailing list