Azure EventHub:可以进行脱机事件缓冲/排队吗? [英] Azure EventHub: offline event buffering/queueing possible?

查看:107
本文介绍了Azure EventHub:可以进行脱机事件缓冲/排队吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里找不到任何明确的答案.我的物联网服务需要容忍不稳定的连接.目前,我自己管理本地缓存,并根据需要重试一次云blob传输.我可以将其替换为Azure EventHub服务吗?即EventHub客户端(在IoT-Core上)是否会缓冲事件直到连接可用?如果是这样,有关此的信息在哪里?

I can't find any definitive answer here. My IoT service needs to tollerate flaky connections. Currently, I manage a local cache myself and retry a cloud-blob transfer as often as required. Could I replace this with an Azure EventHub service? i.e. will the EventHub client (on IoT-Core) buffer events until the connection is available? If so, where is the info on this?

推荐答案

根据以下情况似乎并非如此: https://azure.microsoft.com/zh-我们/documentation/articles/event-hubs-programming-guide/

It doesn't seem so according to: https://azure.microsoft.com/en-us/documentation/articles/event-hubs-programming-guide/

您似乎可以发送和缓存它了:

You are resposible for sending and caching it seems:

异步发送并大规模发送

Send asynchronously and send at scale

您还可以异步将事件发送到事件中心.传送中 异步可以提高客户端发送的速率 事件. Send和SendBatch方法都可以在 返回Task对象的异步版本.虽然这项技术 可能会增加吞吐量,也可能导致客户端继续 即使受事件中心服务限制,也发送事件 并且可能导致客户端失败或丢失消息,如果 实施不正确.此外,您可以使用RetryPolicy 客户端上的属性来控制客户端重试选项.

You can also send events to an Event Hub asynchronously. Sending asynchronously can increase the rate at which a client is able to send events. Both the Send and SendBatch methods are available in asynchronous versions that return a Task object. While this technique can increase throughput, it can also cause the client to continue to send events even while it is being throttled by the Event Hubs service and can result in the client experiencing failures or lost messages if not properly implemented. In addition, you can use the RetryPolicy property on the client to control client retry options.

这篇关于Azure EventHub:可以进行脱机事件缓冲/排队吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆