Le 11/28/12 5:10 PM, Dhruv Chopra a écrit :
> It's difficult to tell what's going wrong without more information. Can
> you tell us more ?
> *- The use case is that the IoHandler upon receipt of a message, broadcasts
> a message of type 'K' to a set of clients. It does so by looping through
> all the IoSessions belonging to that set of clients and calling write on
> them with this object of type 'K'. Encoder A accepts messages of type 'K'
> as input. Encoder A then encodes the message into type 'X' and writes it to
> the given ProtocolEncoderOutput for encoder B to consume (As described
> earlier). Anything specific you would like me to tell you? Or what else I
> could log that could help.*

If you do that, under heavy load, it's likely that a client from another
session sends a message, and tries to write. If those two operations
(your own thread injecting some message in another session's write
queue, and the session's handling an incoming message) are to happen at
the same time, you may have some collision.

May be adding a shared lock in the session's attributes which is hold by
your thread when you write could help...


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to