Azure Event Hub邮件保留似乎不起作用 [英] Azure Event Hub message retention doesn't seem to work

查看:46
本文介绍了Azure Event Hub邮件保留似乎不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在发送到中心的事件中包括日期.每当我通过新的使用者组将新的Azure功能连接到我们的事件中心时,它似乎都会收到发送到中心的所有事件.这在某种程度上是可以预期的,但是我将集线器上的邮件保留"设置为1天,因此我希望最多可以为新用户接收一天的事件,但似乎可以接收到所有 all 事件,根据消息中的日期,甚至是数月前的事件,而且一天中产生的事件比我们多得多.

We include dates in the events sent to our hub. Whenever I connect a new Azure Function to our Event Hub with a new consumer group, it seems to receive all events ever sent to the hub. This is somewhat expected, however I set the Message Retention on the hub to 1 day, so I expected at most to receive one day worth of events for the new consumer, but it seems to receive all events, even months old events, based on the date within the message, and lots more events than we generate over a day.

基于此页面:

https://blogs.msdn.microsoft.com/servicebus/2015/03/09/data-retention-in-event-hubs/

似乎这个保留期没有意义,或者具有误导性.如果容器"尚未填满,则可能永远包含消息.例如,如果在事件中心查看之前,该容器限制为1000条消息,但是生成一年的消息需要花费一年的时间,这是否意味着即使有1天的时间,任何新的使用者也可能会收到具有多年历史的消息. 保留期"?

It seems like maybe this retention period is somewhat irrelevant, or misleading. If the "container" hasn't filled up yet, it could contain messages forever. If, for example, the container has a limit of 1000 messages before the event hub looks at it, but it takes a year to generate 1000 messages, does that mean any new consumer could get year-old messages, even with a 1-day "retention period"?

当容器确实达到1000条消息的限制时,是否保留超过1天的消息并保留比1天之前(在保留期内)新的消息?还是整个容器都被丢弃了?

When the container does hit the limit of 1000 messages, are the messages older than 1 day discarded and the messages newer than 1 day ago (within the retention period) retained? Or is the whole container discarded?

通过查看我们的测试和产品环境,看来此容器至少可容纳50000条消息(或等效大小).

From looking at our test and prod environments it seems like this container fits at least 50000 messages (or equivalent size).

检查点是否是限制此消息最初流入新的消费群的唯一方法?

Is a checkpoint the only way to limit this initial influx of messages for a new consumer group?

推荐答案

保留时间是保证的最小期限,而不是最大或精确的期限.保留1天意味着您将收到前一天的所有消息,但也许还有更多消息.

Retention time is the minimum guaranteed period, not the maximum or exact. 1 day retention means you will have all the messages from last day, but maybe some more messages too.

因此,您可以依靠1天的保留时间,但也准备好查看较旧的邮件.

So you can rely on 1 day of retention, but be prepared to see older messages too.

这篇关于Azure Event Hub邮件保留似乎不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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