This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.
In some circumstances, we may wonder if the partitions in our Azure Event Hub are working as expected from both of Send and Receive sides. This article provides some troubleshooting threads based on Azure Service Bus Explorer tool mainly to narrow down the status of Azure Event Hub partition.
Before we start, we could check several brief features/definitions about Azure Event Hub partition from following documents:
- Overview: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features#partitions
- Choose number of partitions: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features#number-of-partitions
- How to map events to partitions: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features#mapping-of-events-to-partitions
Firstly, we could navigate to our Azure Event Hub resource in the azure portal to get the entire connection string of SAS policy.
Then open the SBE tool and click File--Connect.
Paste the above connection string in the blank space, then keep the default settings and Save.
If the Event Hub is connected successfully, you could find all of consumer groups and partitions of this specific Event Hub in the left expanded list. In the meanwhile, we could check the metadata of specific partition, like offset, last enqueued time, end sequence number.
As we know, we can use a partition key to map incoming event data into specific partitions for the purpose of data organization. If you don't specify a partition key when publishing an event, a round-robin assignment is used. If the ‘LastEnqueuedTime’ is not expected in your scenario, we might consider if the partition is serving ‘Send Message’ request normally from Producer side. If it’s possible to send test event data in your environment, the above ‘Send Events’ would be a good simulation to verity if the partition(on the Azure Event Hub server side) is serving request from Producer. We can even send the events in the batch. If it could be performed successfully, we could investigate from Producer client side further.
Sometimes, we may have issue while consuming event from partition, like consumer group stops receiving any event from Azure Event Hub partition. We could create Partition Listener to run the test to observe the performance/consuming result from specific partition.
This could help us confirm if the Azure Event Hub partition is working from server side.
While performing this Event Listener test, the above highlighted Starting Date Time filter could be another available option if we want to scope timeline from specific time stamp. The Receiver method starts receiving the next event after this time value. If it’s set as null value, Receiver method will starts receiving events from the beginning of this Event Hub partition stream.
We could also check the detailed event data in the ‘Events’ tag, including the Sequence Number, Offset etc. Then, we could compare the Event Properties with the checkpointing files saved by Consumer side to narrow down the issue.
Hope this can be useful!