Skip to main content

ToPipelineDataEvent@1

Node ToPipelineDataEvent@1 is used to send data to the event hub of OctoMesh, enabling inter-pipeline communication within a DataFlow.

This node supports two communication modes:

  • Fire-and-forget (default): Publishes data to a topic exchange. The sending pipeline continues immediately without waiting for the target pipeline to finish.
  • Await result: Sends a command and blocks until the target pipeline completes, returning its result to the sender.

The event triggers the FromPipelineDataEvent@1 node of the target pipeline.

Adapter Prerequisites

  • General availability: All adapters support this node type.

Node Configuration

For fields path, targetPath, targetValueWriteMode, and targetValueKind, see Overview.

FieldTypeRequiredDefaultDescription
targetPipelineRtIdOctoObjectIdNoThe runtime entity ID of the target pipeline. When set, data is routed via the DataFlow topic exchange using this ID as the routing key. When omitted, the event is broadcast to all pipelines in the DataFlow.
awaitResultbooleanNofalseWhen true, sends a command and waits for the target pipeline to complete and return its result. When false, uses fire-and-forget pub/sub.
timeoutSecondsintegerNoTimeout in seconds for the await-result call. Only used when awaitResult is true. If omitted, the default MassTransit request timeout applies.
resultTargetPathstringNo$.pipelineResultJSONPath where the target pipeline's result is placed in the data context. Only used when awaitResult is true.

Fire-and-Forget Mode (Default)

Basic usage (broadcast to all pipelines in the DataFlow)

transformations:
- type: ToPipelineDataEvent@1
description: Load to event hub

Targeted inter-pipeline communication

transformations:
- type: ToPipelineDataEvent@1
description: Send data to a specific pipeline within the DataFlow
targetPipelineRtId: "67e132d6477e78e980bbb512"

In this example, the data is published to the DataFlow's topic exchange with the routing key set to the target pipeline's runtime entity ID. Only the pipeline with a matching FromPipelineDataEvent@1 trigger bound to that routing key will receive the data.

Command/Response Mode (Await Result)

When awaitResult is set to true, the node switches from pub/sub to a command/response pattern. The sending pipeline blocks until the target pipeline completes, and the target's result is placed at resultTargetPath in the sender's data context.

transformations:
- type: ToPipelineDataEvent@1
description: Call target pipeline and wait for result
path: $
targetPath: $
targetPipelineRtId: "67e132d6477e78e980bbb512"
awaitResult: true
timeoutSeconds: 30
resultTargetPath: $.pipelineResult

After execution, the sender's data context will contain the target pipeline's output at $.pipelineResult.

Error Propagation

When awaitResult is true and the target pipeline fails, the error is propagated back to the sender. The sending pipeline's execution will fail with a DataPipelineException containing the target's error message. The sender's subsequent transformation nodes will not execute.

Timeout Handling

If timeoutSeconds is configured and the target pipeline does not respond within the specified duration, the sender will fail with a timeout exception.

Requirements

  • The targetPipelineRtId is required when awaitResult is true.
  • Both pipelines must be within the same DataFlow.
  • The target pipeline must have a FromPipelineDataEvent@1 trigger configured.