Double

Double is a formatter that appends a delimiter string and a second copy of the message’s contents to the message. Independent sets of formatters may be applied to both duplicates.

Parameters

Separator (default: :)

This value sets the separator string placed between both parts. This parameter is set to “:” by default.

UseLeftStreamID (default: false)

Use the stream id of the left side as the final stream id for the message if this value is “true”. This parameter is set to “false” by default.

Left

An optional list of formatters. The first copy of the message (left of the delimiter) is passed through these filters. This parameter is set to an empty list by default.

Left

An optional list of formatters. The second copy of the mssage (right of the delimiter) is passed through these filters. This parameter is set to an empty list by default.

Right

(no documentation available)

Parameters (from core.SimpleFormatter)

ApplyTo

This value chooses the part of the message the formatting should be applied to. Use “” to target the message payload; other values specify the name of a metadata field to target. By default this parameter is set to “”.

SkipIfEmpty

When set to true, this formatter will not be applied to data that is empty or - in case of metadata - not existing. By default this parameter is set to false

Examples

This example creates a message of the form “<orig>|<base64>”, where <orig> is the original console input and <base64> its Base64-encoded equivalent.

exampleConsumer:
  Type: consumer.Console
  Streams: "*"
  Modulators:
    - format.Double:
      Separator: "|"
      Right:
        - format.Base64Encode