简体   繁体   English

C# Azure 持久函数 [聚合器]

[英]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.我正在寻找一种解决方案,我可以根据设备 ID 聚合来自 TCP 甚至来自天蓝色队列的数据。

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.我的目标是每个设备都有一个线程,并在处理数据之前随着时间的推移聚合一些消息,对于上下文,假设我有 10 台设备每 500 毫秒发送 1 条消息,该消息包含它们的 ID 和其他数据。

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 ?是否有可能拥有一个持久的函数,允许我为每个设备 ID 运行一个线程,然后聚合和操作数据, 可能是这个函数

So far everything I could find online would trigger based on Entities, however, I didn't understand how I could actually trigger it.到目前为止,我在网上找到的所有东西都会基于实体触发,但是,我不明白我如何才能真正触发它。

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.使用这种类型的摄取速度,您最好考虑使用 IoT HUB 或类似的东西,它会自动为您完成很多工作,或者使用事件中心进行摄取,然后连接一个函数触发器以对每条消息做出反应并执行您的操作需要。

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.不用担心线程或低级配置事件集线器允许您根据需要/需要批量下载消息,因此一切都完成了,持久功能仅适用于需要很长时间通常需要数小时才能完成的执行,它不会似乎这就是你想要或需要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM