Splitter component

Overview

The splitter component processes incoming messages containing multiple elements that might have to be processed in different ways. The splitter returns the composite message as individual messages, each containing data related to one item.

Environment variable requirements

This component does not have any required environment variables, but it is recommended setting the EIO_REQUIRED_RAM_MB value in order to avoid Component run out of memory and terminated errors.

The recommended value for this allocated memory is 512 MB.

For debugging purposes there is:
LOG_LEVEL - trace

debug

info

warning

error that controls logger level.

Triggers

This component has no trigger functions. Therefore, this component cannot be used as the first one when designing an integration flow.

Actions

Split on JSONata Expression

This component takes the incoming message body (which must be an array) and applies the configured JSONata transformation on it. This array is split and returned as multiple messages.

For example, given the following message:

{
    "FirstName": "Fred",
    "Surname": "Smith",
    "Phone": [
        {
            "type": "home",
            "number": "0203 544 1234"
        },
        {
            "type": "office",
            "number": "01962 001234"
        },
        {
            "type": "mobile",
            "number": "077 7700 1234"
        }
    ]
}

along with the JSONata expression Phone.{type: number}, an object constructor, the action will return the output:

Split on JSONata Expression
If the evaluated array contains primitive values like users:["John", "Mike", "Anna"], the splitter returns an error.

List of Expected Config fields

Split Property - use this field to choose a separator.

Re-assemble Messages

The splitter can also re-assemble split messages, which is the opposite of what this component is designed to do.

For instance, once a stream of incoming messages that had been split by a split action (or similar) had arrived, a single message of all message parts can be generated:

Re-assemble Messages

Supported

  • Messages can be re-ordered in the flow.

  • If messages are re-delivered as a result of the Connect’s 'at once' delivery guarantee, this action does not trigger false positives.

  • Split messages from one message can be interleaved with split messages from another message (e.g. Two overlapping webhook calls arrive and the flow has components where parallel processing > 1.)

Limitations

  • All groups must have one or more messages (i.e. no groups can have a size of 0). Re-grouping is not possible when a split is done on an empty array (i.e. no 'empty' for each pattern supported).

  • If all messages in a group fail to arrive at the re-assemble action (because one message suffered an error earlier in the flow) then the splitter component silently discards this group.

  • All messages must arrive within the same lifetime of its container.
    If at any point there is more than a 15 second gap in messages, then the group is silently discarded.

  • The group is dropped if there are any unexpected restarts to the container.

  • The size of the group must be known by all group members.

  • Messages are only returned when all of its parts have arrived. A message is not returned when only the first part of it arrives.

  • The contents of data picked up by the sub-messages are not passed forward to future steps.

List of Expected Config fields

groupSize - Number of messages in the group

groupId - Globally unique ID for the group to distinguish it from other groups. This value needs to be the same for all messages in a group.

messageId - The ID of a message in a group, to distinguish each message in the group.
These IDs must be unique per group. However, these IDs do not need to be globally unique. This value needs to be different for all messages in a group.

© 2015- Squiz Pty Ltd