流分析:事件处理延迟,性能问题

时间:2018-05-22 08:00:04

标签: azure-stream-analytics

我通过流分析在事件处理方面遇到了一些延迟。我正在开发物联网项目,网关正在向IoTHub发送消息。由于我们正在处理不同类型的消息,因此通过事件中心端点,我们将路由消息。我们的Stream分析作业将从事件中心选择事件,并将开始处理并推送到Service Bus Queue ..

在病房开始下一分钟的工作后,消息将推送到服务总线队列。因此,我们比较了事件中心utc时间和流分析过程时间之间的时差。最初它将在5到10秒内执行。

但是1小时后,这个延迟将增加到15秒,并且会继续。因此,在6或7小时后,生成的消息和消息传递到Service Bus队列间隙将超过1分钟。由于我们的应用程序直接基于实时数据,我可能需要在7小时后重新启动作业(这不是永久解决方案)。

在事件中心我正在使用4个分区和3个流媒体单元正在使用。由于流媒体单元利用率非常低(16%),因此增加流媒体单元不是解决此问题的方法。

请帮助解决这个问题。

我的流分析查询给出了以下内容:

WITH

rawmessage AS

选择

digitaleventhubstreaminputonlineclassaforrawdata。*,

GetMetadataPropertyValue(digitaleventhubstreaminputonlineclassaforrawdata,

' EventHub.IoTConnectionDeviceId') 作为iotdevice

FROM digitaleventhubstreaminputonlineclassaforrawdata

分区 通过PartitionId

messagetoprocess AS

选择

rawmessage。*,

digitalblobreferenceinputnmea。*,

digitalblobreferenceinputwidget。*,

digitalblobreferenceinputscalingfactor。*

FROM rawmessage 划分 通过PartitionId

LEFT JOIN digitalblobreferenceinputnmea on rawmessage.vessel_id = digitalblobreferenceinputnmea.vessel_id

LEFT JOIN digitalblobreferenceinputwidget 在rawmessage.vessel_id = digitalblobreferenceinputwidget.vessel_id

LEFT JOIN digitalblobreferenceinputscalingfactor ON rawmessage.vessel_id = digitalblobreferenceinputscalingfactor.vessel_id

WHERE rawmessage.sensorval IS NOT NULL

processedmessage AS

选择

event.vessel_id为vessel_id_fk,

event.iotdevice as device_id_fk,

event.PartitionId as partitionId, UDF.getEpochTime(event.EventProcessedUtcTime)as EventProcessedUtcTime,

UDF.getAnalyticsProcessTime('精氨酸') 作为AnalyticsProcessTime

FROM messagetoprocess 作为事件 PartitionId分区

- 输出正在写入服务总线队列以进行套接字推送

SELECT * INTO digitalqueueoutputonlineclassasocketdata FROM processedmessage 划分 通过PartitionId

1 个答案:

答案 0 :(得分:0)

我们提出了一张票,他们解决了它..它是微软的一个错误,他们在所有地区部署了这个变化。合并参考输入时发生了延迟。