I've recently upgraded to Mina-2.0.0-M4 from M3 and have a question
about the CumulativeProtocolDecoder. I'm transfering messages that
contain a byte payload over TCP at high speed. 

Is it
recommended to copy the data out of the buffer into another buffer or
can I just use the buffer that is given to me? I was trying to use the
same buffer but I seem to experience a loop in the data I receive. I've
tracked it down to the ProtocolCodecFilter. When the buffer is returned
from the Cumulative decoder, the position is equal to the limit.
However, after the rest of the filters are executed, the buffer
position is back to 0. This causes the cumulative decoder to send me
the same data I just processed. This was never a problem with Milestone
3. I know a zero-copy solution has better performance. What is the
recommended use that has the best performance?

Thanks,
adruch


      

Reply via email to