Closed alrod closed 4 years ago
I verified that EventProcessor.CloseAsync (https://github.com/Azure/azure-functions-eventhubs-extension/blob/dev/src/Microsoft.Azure.WebJobs.Extensions.EventHubs/Listeners/EventHubListener.cs#L131) before EventHubListener.Dispose (https://github.com/Azure/azure-functions-eventhubs-extension/blob/dev/src/Microsoft.Azure.WebJobs.Extensions.EventHubs/Listeners/EventHubListener.cs#L72). So no changes are needed.
We need to dispose EventHubProcessor on EventHubListener disposing. The current behavior can lead to processing messages after EventHubListener is disposed.
https://github.com/Azure/azure-functions-eventhubs-extension/blob/dev/src/Microsoft.Azure.WebJobs.Extensions.EventHubs/Listeners/EventHubListener.cs#L72