Skip to content
Stand with Ukraine flag

Split Array Message

Use this node to fan out a batch payload into individual messages — for example, splitting a bulk telemetry upload that contains an array of readings into one message per reading, each routed independently through the rest of the rule chain. The message originator, type, and metadata are preserved on every split message.

This node has no configuration options.

  1. Inspect the incoming message data and verify it is a JSON array. If not, route via Failure.
  2. If the array is empty, acknowledge the original message and produce no output messages.
  3. For each element in the array, create a new message with:
    • Data: the array element.
    • Originator, message type, and metadata: copied from the original message.
  4. Enqueue all created messages and route them via Success.
  5. Acknowledge the original message once all split messages have been successfully enqueued.
ConnectionCondition
SuccessOne message emitted per array element (zero messages if array is empty).
FailureIncoming message data is not a JSON array.

Incoming data: [{ "sensor": "A", "temperature": 22.5 }, { "sensor": "B", "temperature": 23.1 }]

Result: two output messages:

  1. Data: { "sensor": "A", "temperature": 22.5 }
  2. Data: { "sensor": "B", "temperature": 23.1 }

Incoming data: []

Result: original message acknowledged, zero output messages produced.


Incoming data: { "status": "error", "code": 500 }

Result: routes via Failure — JSON object is not an array.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "EmptyNodeConfiguration",
"type": "object",
"properties": {},
"additionalProperties": false
}