load_balance
Routes the data to one of multiple subpipelines.
Description
The load_balance
operator spawns a nested pipeline for each element in the
given list. Incoming events are distributed to exactly one of the nested
pipelines. This operator may reorder the event stream.
over: list
This must be a $
-variable, previously declared with let
. For example, to
load balance over a list of ports, use let $cfg = [8080, 8081, 8082]
followed
by load_balance $cfg { … }
.
{ … }
The nested pipeline to spawn. This pipeline can use the same variable as passed
to over
, which will be resolved to one of the list items. The following
example spawns three nested pipelines, where $port
is bound to 8080
, 8081
and 8082
, respectively.
The given subpipeline must end with a sink. This limitation might be removed in future versions.