RoundRobin

This router implements round robin routing. Messages are routed to exactly one of the producers registered to the given stream. The producer is switched in a round robin fashin after each message. This producer can be useful for load balancing, e.g. when the target service does not support sharding by itself.

Parameters

Enable (default: true)

Switches this plugin on or off.

Parameters (from core.SimpleRouter)

Stream

This value specifies the name of the stream this plugin is supposed to read messages from.

Filters

This value defines an optional list of Filter plugins to connect to this router.

TimeoutMs (default: 0, unit: ms)

This value sets a timeout in milliseconds until a message should handled by the router. You can disable this behavior by setting it to “0”. By default this parameter is set to “0”.

Examples

This example will send message to the two console producers in an alternating fashin.

loadBalancer:
  Type: router.RoundRobin
  Stream: logs
JunkPrinter00:
  Type: producer.Console
  Streams: randomStream
  Modulators:
    - format.Envelope:
        Prefix: "[junk_00] "
JunkPrinter01:
  Type: producer.Console
  Streams: randomStream
  Modulators:
    - format.Envelope:
        Prefix: "[junk_01] "