Netilion Webhooks vs Kafka
Webhooks
The Netilion platform currently provides webhooks to inform other services about changes regarding measurement data, asset data, or other information. For more information have a look at the available Netilion webhook events
Core Dispatcher Kafka topics
For your applications running on the NEXT platform, we provide the possibility to replace the currently used webhooks with special Kafka topics. These topics are called Core Dispatcher topics.
We currently provide 2 different Kafka topics in place of all the webhooks provided from Netilion Team.
Values topic
The core dispatcher topic for values is named
[company].[projectname].core.[extensionname].values.
The webhooks assigned to this topic are
- asset_value_created
- asset_values_created
Change topic
The Core dispatcher topic for changes is named
[ccompany].[projectname].core.[extensionname].data.
In this topic all other webhooks should be delivered to.
Why use Kafka?
Apache Kafka queues offer several advantages over traditional webhooks implementation:
- Real-time Processing: Unlike webhooks, which are based on the request-response model, Kafka operates on a publish-subscribe model, enabling real-time data processing. This is very beneficial and even crucial if your applications require immediate action on data as it arrives.
- Consumer Offsets: Kafka maintains a numerical offset for each record in a partition. This allows consumers to control their read position and provides the ability to replay or skip messages. In contrast, webhooks do not maintain state information, making it difficult to manage and track data consumption.
- Decoupling of Producers and Consumers: Kafka allows producers and consumers to operate independently at their own pace. This is a significant advantage over webhooks where the producer is blocked until the HTTP response is received.
While webhooks might be simpler to implement, Kafka queues provide a more robust, scalable, and flexible solution for your data streaming needs.
Accessing topics
To access the Kafka topics from the NEXT platform, the Platform Extension has to be registered also in the project configuration. This will create Kafka topics in a centrally managed Kafka cluster. In the project Key Vault a service account, the credentials and connection url are accessible. Have a look here for information how to access these credentials.
Configuration prerequisites
To receive the values from an asset, the asset needs to be assigned to an addon. Either directly or over an intermediate node. On the Platform Extension, that is referencing the addon, the event types are configured.