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

Retry mechanism is not configurable #216

Closed jhendrixMSFT closed 3 years ago

jhendrixMSFT commented 3 years ago

There is no way to configure the behavior of retries when sending a request; it will essentially retry until either the sending succeeds or the context is cancelled. The cited problem with this approach is that callers are oblivious to scaling issues, i.e. their EH is too small for their workload and we keep swallowing "server busy" errors so they are unaware unless they manually look at metrics in the portal (perhaps there's a programmatic way to achieve this). It could be as simple as making a retry cap available to callers. Another option (probably the preferred solution) would be to provide a way for callers to supply their own retry policy so they have complete control over how errors are handled.

richardpark-msft commented 3 years ago

Released as part of https://github.com/Azure/azure-event-hubs-go/releases/tag/v3.3.11