[erlang-questions] Poll: How do you handle spurious messages?
Wed Aug 6 17:30:39 CEST 2014
On Wed, Aug 6, 2014 at 9:55 AM, Peer Stritzinger <peerst@REDACTED> wrote:
> I'm interested in how you deal with spurious messages to your servers i.e.
> ... your important messages here ...
> Any -> ??? % we don't want crud to acrete in the
> Or in gen_server speak: what goes into your catchall
> handle_info(_Info, State) -> ???
I don't usually have catchalls, which I can get away with because I'm
using e2 (just requires a single handle_msg/3 function).
> Do you:
> 1. log the messages
> 1a.) as info
> 1b.) as warning
> 1c.) as error
> 2. count them e.g. with folsom or similar -> then what do you do with the
> 3. Ignore them without trace?
> 4. Crash the server (gasp)?
I think, if you don't have a specific rationale for picking one, pick
the least defensive by default - so crash.
More information about the erlang-questions