SplitNode

constructor(label: String, source: InputChannel<InputT, ChannelT>, mainDestination: OutputChannel<MainOutputT, ChannelT>, sideDestination: PushOutputChannel<SideOutputT>, splitter: (InputT) -> Pair<MainOutputT, SideOutputT>)

Parameters

InputT

the type of incoming entities

MainOutputT

the type of entities sent to the main output

SideOutputT

the type of entities sent to the side output

ChannelT

the channel type (Push or Pull)

label

the name of this node

source

the input channel from which entities are received

mainDestination

the output channel for main entities

sideDestination

the output channel for side entities

splitter

the function that splits an entity into main and side outputs