Event retention in Microsoft Azure EventHub

2019-09-03 15:08发布

I was checking on details about message retention in event hub. Suppose, I have set the retentionPolicy as 1 day and I had send some messages. Then, if I change the message retentionPolicy to 3 days, will the existing eventData also be retained for 3 days?

2条回答
倾城 Initia
2楼-- · 2019-09-03 15:41

Absolutely Yes.

And one more important detail about retention policy - EventHubs does not apply the retention policy at message level. Its at file-system level. EventHubs is a high-throughput event ingestion pipeline. In-short it's a stream of events on cloud - to provide higher thruput & performance - we don't deal with any event-level operations (for example, an equivalent offering is ServiceBus Q/Topics - TimeToLive property on Message). Behind the covers - eventhubs actually stores data in pages (of lets say, for explanation sake 10 MB). Retention policy will be applied only on these pages. So - some of your messages which were sent 10 days before might also still be present, even if you have a retention policy of 1 day - if you have very-very-low data rates on the hub - making into that page.

查看更多
看我几分像从前
3楼-- · 2019-09-03 15:43

Yes, If you use UpdateEventHubAsync to update the message retention period. However, the actual message cleanup time is not guaranteed. The azure infrastructure may decide to cleanup based on its dynamics.

查看更多
登录 后发表回答