@gozayali/node-red-contrib-fabric-eventstream 1.0.0

Send Node-RED messages to Microsoft Fabric Eventstream via Azure Event Hubs using WebSockets and batching.

npm install @gozayali/node-red-contrib-fabric-eventstream

Node-RED Microsoft Fabric Eventstream

A Node-RED node for sending JSON events and telemetry to Microsoft Fabric Eventstream using an Azure Event Hubs compatible custom endpoint.

Features

  • Microsoft Fabric Eventstream Custom Endpoint support
  • AMQP over WebSockets using TCP port 443
  • Persistent EventHubProducerClient connection
  • Event batching for higher throughput
  • Configurable batch size
  • Configurable flush interval
  • Bounded local message queue
  • Backpressure protection to prevent uncontrolled memory growth
  • Automatic EntityPath detection from the connection string
  • Node status showing send and queue state

Requirements

  • Node.js 22 or later
  • Node-RED 3.0 or later
  • Microsoft Fabric Eventstream with a Custom Endpoint

Installation

Install from npm:

npm install @gozayali/node-red-contrib-fabric-eventstream

Or install from the Node-RED Palette Manager by searching for:

@gozayali/node-red-contrib-fabric-eventstream

Configuration

Connection String

Enter the Event Hubs compatible connection string provided by the Microsoft Fabric Eventstream Custom Endpoint.

Example:

Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=example;SharedAccessKey=example;EntityPath=example

Never publish or share your real SharedAccessKey.

Event Hub Entity Name

The Event Hub entity name.

This field can be left empty when the connection string already contains an EntityPath value.

Batch Size

Maximum number of events grouped into a single Event Hubs batch.

Default:

50

Flush Interval

Maximum amount of time that queued messages wait before being sent, even if the configured Batch Size has not yet been reached.

The value is specified in milliseconds.

Default:

1000

Max Pending Messages

Maximum number of messages allowed in the local queue.

When this limit is reached, new messages are rejected instead of allowing the queue and memory usage to grow without limit.

Default:

1000

Input

The node sends the value of:

msg.payload

The payload can be a JavaScript object:

{
  "deviceId": "sensor-01",
  "temperature": 23.9,
  "humidity": 30.8
}

or a string containing valid JSON.

Connection and Transport

The node maintains a persistent Azure Event Hubs producer connection instead of creating a new connection for every message.

AMQP over WebSockets is used so Event Hubs traffic can operate over TCP port 443.

This is useful in environments where the standard AMQP TCP port 5671 is blocked by a firewall.

Batching

Messages are temporarily queued and sent when either:

  • the configured Batch Size is reached, or
  • the configured Flush Interval expires.

The node also respects the maximum Event Hubs batch capacity reported by the Azure SDK.

Node Status

The node displays its current state below the node in the Node-RED editor.

Examples:

connecting...
queue 18/1000
sending 50 | queue: 26
sent 50 | queue: 0
send failed | queue: 24

Security

The Fabric Eventstream connection string contains credentials.

Do not:

  • hard-code a real SharedAccessKey in flows intended for sharing
  • commit connection strings to public source control
  • log the complete connection string
  • publish real Fabric endpoint credentials in examples

If a SharedAccessKey is accidentally exposed, rotate the key in Microsoft Fabric.

License

MIT

Node Info

Version: 1.0.0
Updated 4 days ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

0 in the last week

Nodes

  • fabricEventstream

Keywords

  • node-red
  • microsoft-fabric
  • fabric-eventstream
  • azure-event-hubs
  • websocket
  • telemetry

Maintainers