Azure Event Hub only sending device twin change notifications for SOME devices in IoT Hub

340 Views Asked by At

I have an Azure IoT hub containing a bunch of devices and I have linked the IoT Hub to an Azure Event Hub to subscribe for device twin changes. I then am developing a web application with a Microsoft.Azure.EventHubs.Processor.EventProcessorHost that should get notified when device twin changes happen.

My problem is that when I change SOME devices (from the devices themselves), those notifications are sent but not for all devices. BUT - for ALL devices, the device twin's reported properties are updated succesfully. That's why I find it strange that notifications are only sent for SOME devices - because the device twins are ALWAYS updated.

Can anyone help me to figure out what could be wrong?

One thing that I might be doing incorrectly is that when the EventProcessor gets a notification, it handles the checkpoint very simply by always doing this:

await context.CheckpointAsync();

So everything is checked, blindly. However, I'm not sure that has anything to do with my problem.

Anyone?

Update: This issue is still not solved.

Update: Could it be that my EventProcessor is only connected to one "partition" in the EventHub and therefore it will only get notifications from half of the devices in the IoT Hub (because I think my Event Hub has 2 partitions)?

0

There are 0 best solutions below