Hi,

I have a system which sends a very high throughput of messages. So one
thing I wanted to be able to do during high loads is to take advantage
of the TCP flow control i.e be able to throttle back on the TCP socket
so as not to read off it until the processing catches up. 
 
Does anyone know is there way with Mina to tell it not to read from the
TCP socket? If I return false in the doDecode of the ProtocolDecoder
will that do it?

Cheers Arv

-----Original Message-----
From: Tuure Laurinolli [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2008 3:39 PM
To: [email protected]
Subject: Re: CumulativeProtocolDecoder

Louis Naber wrote:
> I have an unfortunate scenario where I am dealing with legacy output 
> peripherals that do not have nicely designed messaging built into 
> them.  The messages are variable length, unterminated, with no header
information.

Are there *any* rules that allow detection of message boundaries? For
example, is there a time interval between messages? Is a message always
sent in a single IP packet, and is there enough knowledge of the
underlying protocol stack to assume that there will be no fragmentation?

> The question I have, is it possible to find out if more data is 
> available for the session when the lim=capacity just to make sure that

> the incomplete message assumption is correct?

If there is a time interval between messages, you could probably start a
timer when data is received, buffering the data received until the timer
fires, and then pass the buffered data onwards.

Reply via email to