Azure / azure-event-hubs-go

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

Failing to specify an 'entityPath' in a connection string results in an unintuitive error #222

Open richardpark-msft opened 3 years ago

richardpark-msft commented 3 years ago

If you specify a connection string that does not have an EntityPath=<event hub name key/value you get this error:

*Error{Condition: amqp:internal-error, Description: The service was unable to process the request; please retry the operation. 

Which doesn't really tell you what you've done wrong. We can do a cursory check on the string to make sure that EntityPath is specified to avoid surfacing this error.

In other track 2 libraries we actually allow a second form where you can specify a broker-level connection string and then the eventhub is a separate parameter. This could be a nicer way to fix this.

richardpark-msft commented 3 years ago

(referenced in this StackOverflow question: https://stackoverflow.com/questions/68331725/eventhub-golang-client-error-amqpinternal-error/68354113#68354113)

devigned commented 3 years ago

Definitely beneficial to fix that in the client, but would be more impactful to fix that in the service.