Azure Eventhub- How do I know how many messages have been deleted or surpassed retention period?

Vikas Kulkarni 1 Reputation point
2021-03-21T10:40:00.49+00:00

Azure Eventhub- How do I know how many messages have been deleted or surpassed retention period?

Let's say we put retention period as 1day. our consumers trying hard to process all messages but at the end of the day - some messages will be surpassing 1 day retention period. is My understanding correct- as soon as a message hit retention period- its now not made available for consumers to consumed? These are kind of lost messages- from Azure portal is there a quick way for me how many messages are archived or lost by our consumers. This number will be usful for us to improvised on consumers so we dont loose any single message.

We would love to know the message archived or message may be marked as unavailable after retention period?

Thank you in advance.

Azure AI Metrics Advisor
Azure AI Metrics Advisor
An Azure artificial intelligence analytics service that proactively monitors metrics and diagnoses issues.
80 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
556 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 76,921 Reputation points Microsoft Employee
    2021-03-22T10:38:02.773+00:00

    Hello @Vikas Kulkarni ,

    Welcome to the Microsoft Q&A platform.

    Unfortunately, we cannot determine the unread messages in the event hub since it’s only a pull model. We can send events to an event hub and receiver application can receive it, we can’t predict whether messages are read by the client application or not.

    Event Hubs retains events for a configured retention time that applies across all partitions. Events are automatically removed when the retention period has been reached. If you specify a retention period of one day, the event will become unavailable exactly 24 hours after it has been accepted. You cannot explicitly delete events.

    If you need to archive events beyond the allowed retention period, you can have them automatically stored in Azure Storage or Azure Data Lake by turning on the Event Hubs Capture feature, and if you need to search or analyze such deep archives, you can easily import them into Azure Synapse or other similar stores and analytics platforms.

    For more details, see Azure Event Hubs – Event Retention.

    Hope this helps. Do let us know if you any further queries.

    ------------

    Please don’t forget to Accept Answer and Up-Vote wherever the information provided helps you, this can be beneficial to other community members.