Get the number of messages in each partition of topic event hub

venkata rami reddy thangirala 0 Reputation points
2024-09-18T09:08:18.79+00:00

I have a topic in Azure event hub. i want to see how the data is distributed accross partitions. I tried to get count of messages in partition by using AzureDiagnostics but its not working. Can you sugget how can i get it?

I am using ActivaityName_s = "SendMessage" ,

I couldn't see any record has incomingmessage.

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
630 questions
{count} votes

1 answer

Sort by: Most helpful
  1. NIKHILA NETHIKUNTA 1,920 Reputation points Microsoft Vendor
    2024-09-18T17:04:54.3266667+00:00

    @venkata rami reddy thangirala
    Thank you for the question and for using Microsoft Q&A platform.

    It seems like you're trying to get the count of messages in each partition of your Event Hub topic. Unfortunately, Azure Diagnostics doesn't provide a way to achieve this. Only certain metrics are supported by the Azure Monitor for Event Hubs:
    https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-eventhub-namespaces-metrics

    You can count the number of incoming messages using the Metrics section:

    User's image

    In the logs, you can have all the columns mentioned in this document: https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-eventhub-namespaces-metrics

    User's image

    There is no column named Partition_ID. Hence, we cannot achieve this using Azure Monitor.

    For more information, please refer to the below link:
    https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/analyze-metrics#apply-filters-to-charts

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


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.