PropertyChange events exported from IoT Central always go in the same partition in Azure Event Hub for the same device

Dzianis Shyla 1 Reputation point
2022-12-01T11:55:36.147+00:00

I've configured an export of propertyChange events from IoT Central to Azure Event Hub. The event hub has 2 partitions. According to the documentation I saw I expect to see a round-robin strategy on the Event Hub side. But when I check the Event Hub with Service Bus Explorer I see that all property change events from one of my devices (device1) always go in the first partition while all such events from device2 go to the second partition. I see that no PartitionKey is set in the message.
So, the questions are:

  1. Why round-robin strategy doesn't work?
  2. Is it guaranteed that propertyChange events from a device will always go in the same partition?

266157-image.png

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
364 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
644 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dom 1,631 Reputation points Microsoft Employee
    2022-12-01T15:27:40.583+00:00

    My understanding from the other thread is that:

    • It's not possible to explicitly set the partition key from IoT Central.
    • How messages from IoT Central are assigned to Event Hubs partitions is opaque. You may see all messages from a specific device end up on one partition, but you can't rely on this (as seen by one of the contributors to the other thread).
    • If it's important to you that messages are assigned a partition key, you can use one of the strategies outlined in the other thread.
    1 person found this answer helpful.

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.