When configuring a diagnostic settings for a resource in Azure, and configuring that diagnostic setting to an event hub, what is the partition key used when messages are published to the event hub? Or is no partition key used (resulting in round-robin distribution across partitions)? I’ve searched through Microsoft documentation and haven’t been able to find an answer to this question.
The specific use case we have is an application insights resource which has a diagnostic setting configured to send data to an event hub. We then have an Azure stream analytics job consuming from this event hub. We’re trying to understand how data will be partitioned across that event hub so we can properly configure the partition key for the stream analytics job input.
2
Answers
Diagnostic Settings (Azure Monitor) will not set any Partition key for the events, hence the events will be load balanced in a round robin fashion across all the Event Hub partitions.
You should do the same from the Stream Analytics side, and pull from all partitions.
I do agree with @Jdresc you should do this from Stream Analytics side.
Refer this SO link to get more information about partition key.
When configuring a diagnostic setting for a resource in Azure, and configuring that diagnostic setting to an event hub, the partition key used when messages are published to the event hub is derived from the diagnostic setting’s resource ID.
Refer this Github document. According this document,