Currently, we use the EventProcessorHost to consume data, we want to catch the internal exception from the EventHub, so we use the ExceptionReceived event, below is the code:
var host = new EventProcessorHost(
hostName,
eventHubName,
consumerGroupName,
eventHubConnectionString,
storageConnectionString, eventHubName.ToLowerInvariant());
var factory = new DemoEventProcessorFactory(hostName);
var options = new EventProcessorOptions();
options.ExceptionReceived += OptionsOnExceptionReceived;
await host.RegisterEventProcessorFactoryAsync(factory);
So we want to know is it the recommended way to do this? if not what is the right way?