On 6 Mar, 20:35, Ricardo Aguirre <
el.mas...@gmail.com> wrote:
> The problem was *the earlier Client Termination*.
> That's explain the reason some times Server lost some of the last calls.
> But I don't understand why...
The reason for this is that when you call the "send" function, the
message is inserted into the outgoing queue, where it waits for the
nearest opportunity to be physically sent out. If there are many
messages created in a short period of time, they will accumulate in
the queue before they are physically sent. If the process is
terminated in the meantime, some of the messages might never be sent
over the wire.
In order to solve this, the application should involve some additional
logic to ensure that it does not finish prematurely - this might be as
simple as explicitly waiting for the proper message state.