-
Notifications
You must be signed in to change notification settings - Fork 0
Hydro Event Hub
Measurements are provided through an API and as a change feed through an Event Hub.
This page describes the Event Hub.
An event hub allows the caller to listen to additions, deletions and changes of measurements as a stream of events.
To get access to the event hub the following is needed
- Endpoint URL of the event hub
- An access key. Contact DMP Support for further details.
Retention time is currently 5 days, which means that data is kept on the event hub for 5 days after being published. This does not depend on the measurement date, but the creation date.
Microsoft has excelent documentation on reading from an event hub in many languages such as .NET, Python, Javascript and others. See Quickstart: Send events to and receive events from Azure Event Hubs for more information.
All events are published on a single eventhub called 'measurements' . 3 types of events exists
- Measurement Added
- Measurement Updated
- Measurement Deleted
The events can be distuignished by the "EventType" property and consists of a subset of the following properties
Property | Type | Measurement Added | Measurement Updated | Measurement Deleted |
---|---|---|---|---|
EventType | string | "MeasurementAdded" | "MeasurementUpdated" | "MeasurementDeleted" |
stationId | string | x | x | x |
operatorStationId | string | x | x | x |
measurementPointNumber | bigint | x | x | x |
examinationTypeSc | bigint | x | x | x |
measurementDateTime | datetime | x | x | x |
loggerId | string | x | ||
parameterSc | bigint | x | ||
unitSc | bigint | x | ||
formulaId | string | x | ||
result | float | x | x | |
reasonCodeSc | bigint | x | x |
The meaning of the individual properties can be found on the API page.
To avoid excessive amounts of date during datea migration, the following rules apply
- New measurements are published to the event hub if the measurement date is less than 180 days ago. This is around 6 months.
- All deletes of measurements are published to the event hub - independent of the measurement date.
- All updates of measurements are published to the event hub - independent of the measurement date.