[erlang-questions] process restarts and dropped messages

Giovanni Giorgi jj@REDACTED
Sat Aug 23 21:32:20 CEST 2014

Message sent are always successful.
This is my scenario: use gen_server behavior.
Client A has supervisor A.
Server  B has supervisor B.

if B crashes, client A will receive a badmessage (or no message at all).
So A will crash too.
The A supervisor will relaunch it, and also B supervisor will do the same for B.
So if this error is infrequent, all is fine.

Otherwise there is no easy way to fix it.

On 23/ago/2014, at 05:52, Chris Pacejo <colanderman@REDACTED> wrote:

> Hi list,
> Consider the case of a gen_server which crashes and is restarted by
> its supervisor.  If the gen_server had outstanding casts in its
> mailbox, it will lose them.  If the server is restarted quickly
> enough, any clients communicating with it will be unaware of this
> crash, and thus unaware that these messages were dropped.
> What is the standard way of avoiding this issue (assuming crashing the
> client is acceptable)?  Favor calls over casts?  Link to servers you
> need reliable communication with?  Use a reliable message broker?
> Thanks.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

[    [   [  Giovanni ``Daitan`` Giorgi ]   ]    ] 

More information about the erlang-questions mailing list