'C# Azure durable functions [Aggregator]

I'm looking for a solution where I could aggregate data coming from TCP or even from an azure queue based on a device id.

I have been looking at the documentation online and in medium posts and so far I'm not sure if this is possible. My aim is to have a thread per device and aggregate a number of messages over time before working with the data, for context let's say I have 10 devices sending 1 message every 500ms, the message contains their ID and additional data.

Is it possible to have a durable function that would allow me to run a thread per device ID and then aggregate and manipulate the data, probably this function?

So far everything I could find online would trigger based on Entities, however, I didn't understand how I could actually trigger it.



Solution 1:[1]

With that type of ingestion speed you are better of looking at using IoT HUB or something similar which will do a lot of this for you automatically or an event hub for ingestion and then hook up a function trigger to react to each message and do what you need.

Do not worry about threads or low level configurations event Hub allows you to download messages in batches if you want/need so its all done, the durable function is only meant for executions that takes a long time normally many hours to complete, it does not seem that's what you want or need.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matt Douhan