如何从 Azure 事件中心查看最近的数据? 。网
How to peek recent data from Azure Event Hub? .NET
我有一个关于如何通过 .NET 应用程序从事件中心查看最近数据的问题。 我们的需求是每小时持续read/getEvent Hub最近1天的数据。比如6点,我想获取6点的数据昨天一点到今天六点。然后7点,想获取昨天7点到今天7点的数据
我已尝试从 Azure 事件中心接收事件,随后 tutorial. But it doesn't satisify my demand. My comprehension to this receiving events process is that, every time there is a new event coming to Event Hub, a signal will be set up and EventProcessorHost class
将被触发以获取事件数据。 (怀疑自己的理解是否正确) 但是,在这种方法中,一个事件数据只能访问一次。它在下一个接收操作中无法访问,因为它在事件中心消失了。
有没有实现上述需求的方法?
同时,我也想知道如何在接收事件过程中使用“offset”。我知道它的概念,但最好有一个如何使用它的演示。
如果您有任何建议,我将不胜感激。 :)
这不是事件中心设计的场景。它旨在大规模处理传入数据,典型用例是尽可能快地处理该数据。
在您的情况下,您希望以一小时为间隔一次又一次地处理基本相同的数据。 EventProcessrHost
意味着在后台进程中持续 运行ning。
将传入数据存储到 blob 存储中的格式可能会容易得多,格式包括 container\date\time\blob1.json (\container19-12-22\blob1.json ),例如,根据触发的时间触发计划 azure function that than knows what blobs to process。
My comprehension to this receiving events process is that, every time there is a new event coming to Event Hub, a signal will be set up and EventProcessorHost class will be trigged to get the event data. (I doubt whether my comprehension is right.) However, in this method, a event data can only be accessed once. It cannot be accessed in the next receiving operations because it disappers in Event Hub.
没错,EventProcessorHost 将 运行 处理新事件。使用检查点的概念处理一次事件。您可以使用偏移来倒回流,但我认为我的替代方法更容易。
另一项可能对您有用且与事件中心配合良好的技术是 Azure Stream Analytics,它允许您定义基于时间的 windows,但 24 小时可能有点太多了,不确定。
我有一个关于如何通过 .NET 应用程序从事件中心查看最近数据的问题。 我们的需求是每小时持续read/getEvent Hub最近1天的数据。比如6点,我想获取6点的数据昨天一点到今天六点。然后7点,想获取昨天7点到今天7点的数据
我已尝试从 Azure 事件中心接收事件,随后 tutorial. But it doesn't satisify my demand. My comprehension to this receiving events process is that, every time there is a new event coming to Event Hub, a signal will be set up and EventProcessorHost class
将被触发以获取事件数据。 (怀疑自己的理解是否正确) 但是,在这种方法中,一个事件数据只能访问一次。它在下一个接收操作中无法访问,因为它在事件中心消失了。
有没有实现上述需求的方法?
同时,我也想知道如何在接收事件过程中使用“offset”。我知道它的概念,但最好有一个如何使用它的演示。
如果您有任何建议,我将不胜感激。 :)
这不是事件中心设计的场景。它旨在大规模处理传入数据,典型用例是尽可能快地处理该数据。
在您的情况下,您希望以一小时为间隔一次又一次地处理基本相同的数据。 EventProcessrHost
意味着在后台进程中持续 运行ning。
将传入数据存储到 blob 存储中的格式可能会容易得多,格式包括 container\date\time\blob1.json (\container19-12-22\blob1.json ),例如,根据触发的时间触发计划 azure function that than knows what blobs to process。
My comprehension to this receiving events process is that, every time there is a new event coming to Event Hub, a signal will be set up and EventProcessorHost class will be trigged to get the event data. (I doubt whether my comprehension is right.) However, in this method, a event data can only be accessed once. It cannot be accessed in the next receiving operations because it disappers in Event Hub.
没错,EventProcessorHost 将 运行 处理新事件。使用检查点的概念处理一次事件。您可以使用偏移来倒回流,但我认为我的替代方法更容易。
另一项可能对您有用且与事件中心配合良好的技术是 Azure Stream Analytics,它允许您定义基于时间的 windows,但 24 小时可能有点太多了,不确定。