Module vent_handler

This module defines the vent_handler behaviour.
Required callback functions: init/0, handle/2, terminate/1.

Data Types

state()

state() = term()

Function Index

handle/3Handle message.
init/1Initialize subscription handler.
terminate/2Stops a pusher.

Function Details

handle/3

handle(Mod::module(), Msg::term(), State::state()) -> {ok, state()} | {requeue, term(), state()} | {drop, term(), state()}

Handle message

The implementation can respond with one of 3 messages: * {ok, State} - Processing is done and we should move on * {requeue, Reason, State} - With that response handler is communicating that it couldn't process it right now, but that situation could change in feature, so message should be re tried later. This usually happens if other systems are down and can't be reached, but may become available in feature. * {drop, Reason, State} - Handler should respond with drop only if it can't do anything with message and it wont change in feature. In this case message is moved to error queue and never re-tried. Usually you get those responses with ill-formatted messages.

init/1

init(Mod::module()) -> {ok, state()}

Initialize subscription handler.

terminate/2

terminate(Mod::module(), State::state()) -> ok

Stops a pusher.


Generated by EDoc, Sep 22 2016, 10:39:34.