0

I have a data pipeline set up in Azure where I send messages to an IoTHub which then routes those messages to an EventHub. When I read from the EventHub using the standard EventProcessorHost method, I find that only one of the partitions is being read from. I assume that only one partition is actually having messages routed to it. I have not specified a partition key anywhere and expect that the messages would be routed to all of the partitions of the event hub using round robin (as per the documentation at https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-programming-guide).

How can I configure my setup to route messages to all partitions of the event hub?

  • Is it possible you are only receiving data from one device? IoT Hub does automatic partitioning based on the deviceId, so the partition affinity might be the cause – Alex AIT Mar 22 '19 at 22:29
  • Yes, that's the issue. I was sending a large number of messages to IoT Hub as a single device. Thanks! – Aidan Bailey Mar 22 '19 at 23:49
  • Glad that I could help. I will post the comment as an answer as well so it is more clean. If you accept it then others can see the problem was solved. – Alex AIT Mar 23 '19 at 06:57

1 Answers1

1

Like I said in the comment:

Is it possible you are only receiving data from one device? IoT Hub does automatic partitioning based on the deviceId, so the partition affinity might be the cause.

Alex AIT
  • 17,361
  • 3
  • 36
  • 73