How to verify if Azure Event Hub partition is working by using Azure Service Bus Explorer tool
Published Dec 13 2021 09:33 PM 4,858 Views
Microsoft

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.

 

Pre-requirement

Before we start, we could check several brief features/definitions about Azure Event Hub partition from following documents:

  1. Overview: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features#partitions
  2. Choose number of partitions: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features#number-of-partitions
  3. How to map events to partitions: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features#mapping-of-events-to-partition...

 

Please make sure that Azure Service Bus Explorer tool is installed from this link. (naming the tool as SBE in the following sections)

 

Detailed Steps:

Firstly, we could navigate to our Azure Event Hub resource in the azure portal to get the entire connection string of SAS policy.

 

Jay_Gong_0-1638855378005.png

 

 

Then open the SBE tool and click File--Connect.

 

Jay_Gong_1-1638855378007.png

 

 

Paste the above connection string in the blank space, then keep the default settings and Save.

Jay_Gong_2-1638855378010.png

 

 

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.

 

Jay_Gong_3-1638855378016.png

 

 

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.

 

Jay_Gong_4-1638855378018.png

 

Jay_Gong_5-1638855378019.png

 

 

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.

 

Jay_Gong_6-1638855378021.png

 

 

Jay_Gong_10-1638855551773.png

 

 

 

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.

 

Jay_Gong_8-1638855378030.png

 

Hope this can be useful!

Co-Authors
Version history
Last update:
‎Dec 13 2021 09:33 PM
Updated by: