Finally I found the bug. Problem was in my decoder.
protected boolean doDecode(IoSession session, IoBuffer in,
ProtocolDecoderOutput out) throws Exception {
if (in.remaining() < 5) {
return false;
}
.....
}
Here 2-bytes messages were deferred and delivered only when other packets
arrive which were 30+ bytes. That caused the delivery of both the messages.
James, thanks for your time.
Our experience with Mina2.0.0RC1 has been excellent. Wishing you best of
luck.
-Ashutosh
On Sun, Aug 22, 2010 at 9:44 AM, Ashutosh Sharma <[email protected]>wrote:
> Hi James,
>
> Thanks. I read. Only in some experiements I turned it to false and that was
> silly copy-paste in mail. My bad.
>
> I read following article which says something about writing heartbeat
> http://permalink.gmane.org/gmane.comp.apache.mina.user/2546
> But I suspect that this code is for older version of Mina and the solution
> says about removing processing delay.
>
>
> -Best Regards
> Ashutosh
>
>
>
>
>
> On Sun, Aug 22, 2010 at 6:57 AM, James Ring <[email protected]> wrote:
>
>> Hey Ashutosh,
>>
>> On Sat, Aug 21, 2010 at 6:00 AM, Ashutosh Sharma <[email protected]>
>> wrote:
>> > Hi,
>> >
>> > Thanks James. Unfortunately that did not work for me.
>> > Don't laugh but I tried both setTcpNoDelay(false) & setTcpNoDelay(true);
>>
>> You want to set TcpNoDelay to true. Did you read the FAQ I linked you to?
>>
>> Regards,
>> James
>>
>
>