Skip to main content
Version: 3.0 (next)
Azure Event Hubs Trigger Node interface

Azure Event Hubs trigger node

Azure Event Hubs Trigger Node

Overview​

The Azure Event Hubs Trigger Node automatically initiates MaestroHub pipelines when events arrive on an event hub. Unlike the Event Hubs Send connector node which sends events within an already-running pipeline, the Event Hubs Trigger starts new pipeline executions in response to incoming events—enabling fully event-driven stream processing.


Core Functionality​

What It Does​

Event Hubs Trigger enables real-time, event-driven pipeline execution by:

1. Event-Driven Pipeline Execution Start pipelines automatically when events arrive on an event hub, without manual intervention or polling. Ideal for stream processing, event-driven microservices, and real-time data ingestion.

2. Partition-Aware Consumer Groups Uses a partition-aware EventProcessor with the connection's consumer group. With an Azure Blob checkpoint store, multiple pipeline instances load-balance the hub's partitions between them for parallel processing and fault tolerance.

3. Event Payload and Metadata Passthrough Incoming event payloads along with metadata (partition ID, offset, sequence number, partition key, enqueued time) are passed directly to the pipeline, making them available to all downstream nodes via the $node and $trigger variables.


Configuration Options​

Basic Information​

FieldTypeDescription
Node LabelString (Required)Display name for the node on the pipeline canvas
DescriptionString (Optional)Explains what this trigger initiates

Parameters​

ParameterTypeDefaultRequiredConstraintsDescription
Connection IDstring""Yes--Azure Event Hubs connection profile to use.
Function IDstring""Yes--Consume function within the connection. Only Consume functions are listed.
Trigger Modeselect"always"Noalways / onChangealways: Trigger on every event. onChange: Only trigger when the payload differs from the last received value for that partition.
EnabledbooleantrueNo--Enable/disable the trigger. When disabled, no events are consumed from the hub.
Function Requirement

The selected function must be an Azure Event Hubs Consume function type. Send, Send Batch, Get Partitions, and List Consumer Groups functions cannot be used with Event Hubs Trigger nodes.


Settings​

Description

A free-text area for documenting the node's purpose and behavior. Notes entered here are saved with the pipeline and visible to all team members.

Execution Settings

SettingOptionsDefaultDescription
Timeout (seconds)numberPipeline defaultMaximum execution time for this node (1–600). Leave empty for pipeline default.
Retry on TimeoutPipeline Default / Enabled / DisabledPipeline DefaultWhether to retry the node if it times out.
Retry on FailPipeline Default / Enabled / DisabledPipeline DefaultWhether to retry on failure. When Enabled, shows Advanced Retry Configuration.
On ErrorPipeline Default / Stop Pipeline / Continue ExecutionPipeline DefaultBehavior when node fails after all retries.

Advanced Retry Configuration (visible when Retry on Fail = Enabled)

FieldTypeDefaultRangeDescription
Max Attemptsnumber31–10Maximum retry attempts.
Initial Delay (ms)number1000100–30,000Wait before first retry.
Max Delay (ms)number1200001,000–300,000Upper bound for backoff delay.
Multipliernumber2.01.0–5.0Exponential backoff multiplier.
Jitter Factornumber0.10–0.5Random jitter (+-percentage).

Output Data Structure​

When an Event Hubs event triggers pipeline execution, the following data is available to downstream nodes via the $trigger variable.

Output Format​

{
"_metadata": {
"type": "azureeventhubs_trigger",
"partitionId": "0",
"offset": "12345",
"sequenceNumber": "87",
"partitionKey": "line-3",
"enqueuedTime": "2026-09-05T14:47:19.123Z",
"protocol": "azureeventhubs",
"connectionId": "bf29be94-fc0a-4dc4-8e5c-092f1b74eb4b",
"functionId": "aef374c3-aa2b-454e-aabc-5657faac5950",
"timestamp": "2026-09-05T14:47:19.123Z"
},
"result": {
"deviceId": "line-3",
"temperature": 21.5
}
}

Accessing Event Data​

In downstream nodes, use the $trigger variable to access the trigger output:

FieldExpressionDescription
Event Payload$trigger.resultThe event body. Valid JSON is delivered parsed — an object, array, number or string — so $trigger.result.<field> reads a field directly. Anything that is not valid JSON is delivered as a string
Partition$trigger._metadata.partitionIdThe partition the event was read from
Offset$trigger._metadata.offsetThe event's offset in that partition
Sequence Number$trigger._metadata.sequenceNumberThe event's sequence number in the partition
Partition Key$trigger._metadata.partitionKeyThe partition key the producer sent — present only when one was set
Enqueued Time$trigger._metadata.enqueuedTimeWhen Event Hubs accepted the event (RFC 3339, UTC)
Protocol$trigger._metadata.protocolAlways azureeventhubs
Connection ID$trigger._metadata.connectionIdThe connection profile the trigger runs on
Function ID$trigger._metadata.functionIdThe subscribe function that received the message
Trigger Type$trigger._metadata.typeAlways azureeventhubs_trigger
Timestamp$trigger._metadata.timestampWhen MaestroHub received the message (RFC 3339, UTC)
Accessing Nested Payload Data

Every _metadata value is a string — "3", not 3; "false", not false — so compare them as strings. The message itself keeps its JSON types:

  • $trigger.result.deviceId — a field of a JSON event
  • $trigger.result — the whole event

Validation Rules​

The Azure Event Hubs Trigger Node enforces these validation requirements:

Parameter Validation​

Connection ID

  • Must be provided and non-empty
  • Must reference a valid Azure Event Hubs connection profile
  • Error: "Azure Event Hubs connection is required"

Function ID

  • Must be provided and non-empty
  • Must reference a valid Azure Event Hubs Consume function
  • Function must belong to the specified connection
  • Error: "Consume function is required"

Enabled Flag

  • Must be a boolean if provided
  • Error: "Enabled must be a boolean value"

Consumption and Checkpointing​

The trigger's consumer position is tracked by the connection's checkpoint store:

  • In-memory checkpoint store: partition offsets are lost on restart, and only one instance may consume (no cross-instance coordination). Suitable for testing and single-instance deployments.
  • Azure Blob checkpoint store: offsets are committed durably. Multiple instances load-balance partitions and resume from the last committed offset after a restart — required to scale the trigger out.

The consume function's Start Position (latest or earliest) only applies to partitions that have no checkpoint yet; once offsets are committed, consumption resumes from the last committed position.


Usage Examples​

Stream Processing Pipeline​

Scenario: Consume raw sensor events from an event hub, enrich them with asset metadata, and send processed results to a downstream hub.

Configuration:

  • Label: Sensor Event Processor
  • Connection: Production Event Hubs
  • Function: Consume from telemetry (consumer group: sensor-enrichment)
  • Trigger Mode: always
  • Enabled: true

Downstream Processing:

  • Parse JSON payload to extract sensor readings
  • Enrich with asset metadata from a MongoDB lookup
  • Apply data quality validations
  • Send enriched events to a processed-telemetry hub

Real-Time UNS Ingestion​

Scenario: Ingest device events published to Event Hubs by an Azure-native gateway and publish them into the Unified Namespace.

Configuration:

  • Label: Device Event Ingestor
  • Connection: IoT Event Hubs
  • Function: Consume from device-events (consumer group: uns-ingest)
  • Trigger Mode: always
  • Enabled: true

Downstream Processing:

  • Map the event payload to a UNS topic path
  • Publish to the UNS
  • Log ingest results for an audit trail

Deduplicated Event Processing​

Scenario: Process equipment status updates from Event Hubs but only trigger pipeline execution when the status actually changes, reducing unnecessary processing.

Configuration:

  • Label: Equipment Status Monitor
  • Connection: Factory Event Hubs
  • Function: Consume from equipment-status (consumer group: status-monitor)
  • Trigger Mode: onChange
  • Enabled: true

Downstream Processing:

  • Extract equipment ID and new status from the payload
  • Update equipment state in MongoDB
  • Send a notification via MS Teams for critical status changes
  • Log state transitions for historical analysis