Azure / azure-event-hubs-go

Golang client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
MIT License
90 stars 69 forks source link

Skip calling sender.Recover() for some errors #219

Closed jhendrixMSFT closed 3 years ago

jhendrixMSFT commented 3 years ago

For transient errors where we know the connection is good, don't Recover() the connection as that doesn't really help.

Fix or Enhancement?

Environment

jhendrixMSFT commented 3 years ago

Fixes https://github.com/Azure/azure-event-hubs-go/issues/217

jhendrixMSFT commented 3 years ago

@richardpark-msft these were the two obvious candidates where recovering the connection could potentially make things worse. Any other errors we should add to the list? Looking at https://github.com/Azure/azure-sdk-for-net/blob/4162f6fa2445b2127468b9cfd080f01c9da88eba/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpClientConstants.cs#L45-L65, I wonder if we should skip recovering on all of these errors? Could that be as simple as looking for the vendor prefix com.microsoft:?

jhendrixMSFT commented 3 years ago

/azp run

azure-pipelines[bot] commented 3 years ago
Azure Pipelines successfully started running 2 pipeline(s).