Search code examples
azure-eventhub

Consumer group Load balanced readers


I am doing some POC to use EventHub, i do have multiple instances for a consumer and expect only one of the instance will receive the event, i tried both EventHubClient and EventProcessorHost is there any way i can make it possible. Kafka has a similar support for Load balanced consumer based on consumer group https://kafka.apache.org/intro.html#intro_consumers. I always get an error saying

New receiver with higher epoch of '4' is created hence current receiver with epoch '3' is getting disconnected. 

Solution

  • The issue was that the host name which i registered was same for every instance, Now i have changed to use different host name per instance using UUID Random as hostname while constructing the EventProcessorHost class