与Azure事件中心通信时发生EPOCH错误 [英] EPOCH Error while communicating with Azure Event Hub

查看:101
本文介绍了与Azure事件中心通信时发生EPOCH错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Azure Event Hub监听应用程序中的实时数据.在大多数情况下,它工作正常,但有时会引发以下错误-

I am using Azure Event Hub for listening to real-time data in my application. Most of the times, it works fine but sometimes it throws the following error -

创建新的接收器,其具有较高的"3109"纪元,因此当前具有"3108"纪元的接收机已断开连接.如果要重新创建接收器,请确保使用更高的纪元. TrackingId:eb2a6f970000494500f379f85b484a9f_C-1553490498_B22,SystemTracker:xxxxxxxxxx:eventhub:xxxxxxx〜2730 | $ default,时间戳:7/13/2018 6:48:54 AM.

New receiver with higher epoch of '3109' is created hence current receiver with epoch '3108' is getting disconnected. If you are recreating the receiver, make sure a higher epoch is used. TrackingId:eb2a6f970000494500f379f85b484a9f_C-1553490498_B22, SystemTracker:xxxxxxxxxx:eventhub:xxxxxxx~2730|$default, Timestamp:7/13/2018 6:48:54 AM.

,应用程序停止处理数据.我在网上浏览了几篇文章,但找不到任何解决方案.在MSDN上,我阅读

and application stops processing data. I have gone through several articles on the net but not able to find any solution. On MSDN, I read

EPH依赖于以下事实:在任何给定时间,一个消费群体上只能有1个有效的时代接收器

that EPH relies on the fact that "there can only be 1 active epoch receiver on a consumer group at any given time

但我不确定如何确保只有1个有效时期.同样,同一事件中心可在三种不同的环境(开发,测试,生产)中使用.

but I am not sure how to ensure that there will be only 1 active epoch. Also, the same Event Hub is utilized by three different environments i.e. Development, Test, Production.

任何建议都将受到高度赞赏.

Any suggestions are highly appreciated..

推荐答案

听起来您正在运行该应用程序的两个实例,两个并发类或两个使用相同事件中心使用者组的应用程序.事件中心使用者组实际上是指向事件流上某个时间点的指针.如果尝试使用指向两个代码实例的一个使用者组,那么您将遇到与看到的冲突.

It sounds like you are running two instances of the application, two concurrent classes, or two applications that use the same event hub consumer group. Event hub consumer groups are effectively pointers to a point in time on the event stream. If you try and use one consumer group pointing with two instances of code, then you get a conflict like the one you are seeing.

任何一个:

  1. 确保您一次只有一个实例读取使用者组.
  2. 当您需要两个单独的程序或功能集来同时处理事件中心时,请使用两个使用者组.
  3. 如果要并行化性能,请查看事件中心分区,以及如何利用独立处理每个分区的优势.

还有另一种方案,其中事件集线器分区作为事件集线器内部负载平衡的一部分切换到另一台主机.在这种情况下,您可能会看到收到的错误.在这种情况下,只需登录并继续.

There is also an alternative scenario where an event hub partition is switched over to another host as part of the event hub's internal load balancing. In this case you may see the error you are receiving. In this case, just log it and continue on.

这里有一些很好的文档可以帮助您

这篇关于与Azure事件中心通信时发生EPOCH错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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