This module defines the vent_handler behaviour.
Required callback functions: init/0, handle/2, terminate/1.
state() = term()
handle/3 | Handle message. |
init/1 | Initialize subscription handler. |
terminate/2 | Stops a pusher. |
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(Mod::module()) -> {ok, state()}
Initialize subscription handler.
terminate(Mod::module(), State::state()) -> ok
Stops a pusher.
Generated by EDoc, Sep 22 2016, 10:39:34.