question

VikasKulkarni-2414 avatar image
0 Votes"
VikasKulkarni-2414 asked PRADEEPCHEEKATLA-MSFT commented

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

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-event-hubsazure-metrics-advisor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PRADEEPCHEEKATLA-MSFT avatar image
0 Votes"
PRADEEPCHEEKATLA-MSFT answered PRADEEPCHEEKATLA-MSFT commented

Hello @VikasKulkarni-2414,

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.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @VikasKulkarni-2414,

Just checking in to see if the above answer helped. If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.

1 Vote 1 ·

Hello @VikasKulkarni-2414,
Following up to see if the above suggestion was helpful. And, if you have any further query do let us know.
Take care & stay safe!

1 Vote 1 ·