Copyright © 2019 Klarna Bank AB (publ)
This module defines the kflow_gen_demux behaviour.
Required callback functions: demux/3.
Optional callback functions: init/1, terminate/1.
This stateless stream processing node splits stream of messages into multiple sub-streams according to an output value of a callback.
-module(my_demux).
-behavior(kflow_gen_demux).
-export([init/1, demux/3, terminate/1]).
init(Config) ->
State = do_init(Config),
State.
demux(Offset, Message, State) ->
maps:get(key, Message, default).
terminate(State) ->
do_cleanup(State).
callback_fun() = fun((kflow:offset(), _Message) -> _Route)
Generated by EDoc