I'm developing an Azure IoT web application that consumes events from an Azure Event Hub. I regularly publish the web application to Azure in a testing environment and then I also run the it in debug mode from my own machine and when that happens, essentially there are two web applications running at the same time that are consumers of the Event Hub.
I'm wondering if one consumer might "swallow" a notification so that the other consumer will not get it. That would be bad and I would have to set up a separate Event Hub just for my debugging local machine.
Will both consumers of the Event Hub get all the notifications?
I haven't set up the Event Hub or the consumer code in any special way. The consumer code is using an Azure.Messaging.EventHubs.EventProcessorClient
and its ProcessEventAsync()
looks like this:
async Task ProcessEventHandler(ProcessEventArgs eventArgs)
{
string deviceId = eventArgs.Data.Properties["deviceId"].ToString();
string message = Encoding.UTF8.GetString(eventArgs.Data.Body.Span);
await ProxyMessageToController(deviceId, message);
await eventArgs.UpdateCheckpointAsync(eventArgs.CancellationToken);
}