I have a Azure VM on which a Windows service is installed.
In this Windows service, we are registering to the EventHub like mentioned in this website.
I have method which logs error like this:
Task IEventProcessor.ProcessErrorAsync(PartitionContext context, Exception error)
{
log.Error($"Error: {error.Message}");
return Task.CompletedTask;
}
This Windows service keeps listening to the event hub and whenever a event is received, it performs some processing based on the event (some business logic). When the processing is happening, it sometimes throws this error in between.
Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
But there after some time, it resumes its processing as usual. So why do these error messages come and is it getting resolved by itself. This is not causing any issue for me but want to know the reason and want to avoid this in future completely if possible. I have searched a lot about this on net, couldn't find any proper solution.
I think you should take a look at Azure Event Hubs quotas and limits and How exactly does Event Hubs Throttling Work?, as from your description of the problem, it might be possible you are hitting a throttling threshold.
Hope it helps!