You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Behavior of eventhub.NewHubWithNamespaceNameAndEnvironment should have sane defaults when invalid arguments (event hubs namespace and/or event hub name etc.) are passed i.e. timeout/fail in a reasonable amount of time
Or, it should allow the caller to enforce timeout by allowing it pass in a context.Context
Actual Behavior
I tried two scenarios:
did not pass in valid event hubs namespace and/or event hub name (code was expecting it from env vars which I had missed and hence blank "" was passed in)
did not pass in AAD env vars (AZURE_CLIENT_ID etc.) or SAS env vars
In both cases, I got the below error, but the app was stuck for ~3.5 mins
failed to create EH client neither Azure Active Directory nor SAS token provider could be built - AAD error
: failed to refersh token: &{{{ 0 0 0 } 0x1668640 {{ <nil> false } { <nil> false } {http <nil> 169.254.169.254 /me
tadata/identity/oauth2/token false api-version=2018-02-01&resource=https%3A%2F%2Feventhubs.azure.net%2F } { <nil> false }
} https://eventhubs.azure.net/ true 300000000000} 0xc0000c01a0 0xc00009d020 <nil> [] 5}, SAS error: unable to build SAS token
provider because (EVENTHUB_KEY_NAME and EVENTHUB_KEY_VALUE) were empty, and EVENTHUB_CONNECTION_STRING was empty
Environment
OS: mac os
Go version: 1.14
Version of Library: 3.3.0
The text was updated successfully, but these errors were encountered:
I haven't been able to reproduce this error. I created a simple example that only calls eventhub.NewHubWithNamespaceNameAndEnvironment and first did not set any environment variables and the error response returned was almost immediate. Then I set the vars you mentioned in your first scenario and the result was the same. I received the error response again almost immediately. Do you have code that could reproduce this problem so that I could test it out?
Expected Behavior
Behavior of
eventhub.NewHubWithNamespaceNameAndEnvironment
should have sane defaults when invalid arguments (event hubs namespace and/or event hub name etc.) are passed i.e. timeout/fail in a reasonable amount of timeOr, it should allow the caller to enforce timeout by allowing it pass in a
context.Context
Actual Behavior
I tried two scenarios:
In both cases, I got the below error, but the app was stuck for ~3.5 mins
Environment
The text was updated successfully, but these errors were encountered: