Developer Portal
Connector Guides
API ReferenceConsole

Azure Event Hub - Destination

AzureLogo

Azure Event Hub is a cloud-based data streaming platform and event ingestion service offered by Microsoft Azure. It is part of Azure's broader suite of services for building real-time, data-driven applications and processing massive amounts of event data. Azure Event Hub Connector utilizes the open, standardized protocol AMQP for communication between the services.

Using this Connector allows you to take the normalized Mapped data and send it to Azure Event Hub for further use.

Use Cases

Effectively any use case can be enabled through the Azure Event Hub Connector, as the data can be analyzed and utilized in a variety of ways once it's streamed.

  • Apply analytics to energy data for energy optimization
  • Utilize streamed environmental data like temperature, humidity, and air quality to monitor for occupant comfort
  • Store BMS data for predefined, extended periods of time for compliance and auditing purposes

Configuration

To enable access to your Azure Event Hubs, you'll first need to create a Shared Access Policy and provide the resulting Connection String below.

From the Azure Portal:

  • Go to your Event Hub Namespace
  • Ensure that the EventHub Namespace pricing tier is set to Standard or better (anything but Basic)
  • Click on Event Hubs to display all existing hubs
  • We recommend a dedicated hub for each Mapped integration
  • The number of partitions will depend on the data stored in Mapped. If you're unsure, use 4 partitions as a starting point.
  • Click on the hub to see its details.
  • Click on Shared access policies in the left menu
  • Create a new policy with the following permissions: Send
  • Copy the resulting 'Connection string-primary key'

CredentialDescription
Connection string-primary keyConnection string for the specific Event Hub that you'd Mapped to push data to

There is no additional config required once the Connection string is added, the data will start to flow to that location once the Connector config is saved.

Sample Code

Below are some samples showing different data types and how the payload will look when delivered to Event Hub:

Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Numeric Value
{
  "pointId": "PNT00000000000000",
  "timestamp": "2023-01-01T00:00:00.000Z",
  "value": 97.5
}

// String Value
{
  "pointId": "PNT00000000000000",
  "timestamp": "2023-01-01T00:00:00.000Z",
  "value": "OFF"
}

// Complex Value
{
  "pointId": "PNT00000000000000",
  "timestamp": "2023-01-01T00:00:00.000Z",
  "value": {
    "access": "ALLOWED"
  }
}

// Boolean Value
{
  "pointId": "PNT00000000000000",
  "timestamp": "2023-01-01T00:00:00.000Z",
  "value": false
}