Le 01/09/15 17:26, Leonardo D'Alimonte a écrit :
> Hello Emmanuel,
> actually it seems as if the Queue data structure continues to
> increase..message after message.
> We cannot check if the our device receive the message, the implemented
> protocol doesn't allow this, do you mean checking if the session goes in an
> IDLE state? I can add override of method "sessionIdle(IoSession,
> IdleStatus) to our HandlerAdapter..

If the remote device brutally disconnected from the server, you will
*not* be able to know about it. That means you will keep sending data to
this inexistant client, and as this client is not there to read those
messages, they will just accumulate in memory.

You have to manage the idle state of your sessions : after a delay, you
might want to kill the session, which will remove all the pending messages.

Another option : when you send a message to a client, you know it has
been actually sent when you receive the messageSent event. If you don't
get this event, that means your client is not reading the messages. A
smart way to mitigate what we call 'slow readers' is to check that each
message written into a session has been sent and if not, kill the
session (or kill it after a number of written messages for which you
havent received a messageSent event).

Reply via email to