[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
Tue Oct 28 10:45:59 EDT 2008


"timfox" wrote : "clebert.suconic at jboss.com" wrote : 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.
  |   | 
  | 
  | Isn't that how it already works? I don't understand why you need to change this.
  | 

The current implementation is not using Semaphores, it is using just an AtomicInteger, and there are only two states on the Consumer... sending or not sending, as there is not need to wait during the sending of a message.

With the message chunk, we need to wait for credits during the chunk-sending. Say... if I'm sending a 1G file to the client, I need to wait for credits as the client is being able to receive bytes from the server.

Another point regarding flow control is, I'm aways sending BigMessages in a blocked way until we can have FlowControl re-enabled.



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

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



More information about the jboss-dev-forums mailing list