Thanks Trustin,

Just to answer Nilas I am using Mina 0.9.5 on Fedora Core 4.

I have changed my codec to use DemuxingProtocolCodecFactory and it has made a big difference. I am not longer receiving messages missing there headers but I am still getting some (not as many) with the header of the next message on the end of it.

if the length of the message is to long I am returning MessageDecoder.NOT_OK in my decodable method. If I do this a then a "ProtocolDecoderException: No appropriate message decoder" gets thrown by the DemuxingProtocolCodecFactory and the user gets disconnected from the server.

Is there a better way for me to check if my message is to long or to make sure it stops at the next messages header? Also can I stop it from disconnecting the user and just ignore the message?

Thanks again for all your help guys!

Lee.


On 07/09/2006, at 7:53 PM, Trustin Lee wrote:

On 9/7/06, Lee Kemp <[EMAIL PROTECTED]> wrote:

Hi All,

I am having a small (hopefully) problem.

I have just deployed a new app that I have written using mina to our
production servers and when doing some load testing noticed that some
of the message objects contain the header that should be on the next
message. We don't have this problem on our development server when
testing it on our local network so it must be something happening to
the packets on the way to the server.

Has anyone else experienced this issue?


If you are using TCP/IP, it can always happen. It's a nature of TCP/IP. Packets can be merged and splitted due to network or load condition. So you have to interpret the ByteBuffer considering this issue. Fortunately, we already provide a solution for this issue. Please take a look into SumUp
example and see how we implemented our codec using
DemuxingProtocolCodecFactory.

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Reply via email to