Replies: 1 comment 3 replies
-
|
Thanks, I have created the following issue - #1777 I'll see what the 6.x behavior is. Your suggestion is reasonable! |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I create a new
IConnectionusing below call.Connection = await ConnectionFactory.CreateConnectionAsync(cancellationToken).ConfigureAwait(false);Inside the ConnectionFactory I have to specify Hostname, Port, UserName and so. In case the host is not reachable the above call will give me a
BrokerUnreachableExceptionwhich is the desired behaviour. However in case the combination of UserName and Password is wrong, the above call will succeed. TheIConnectionobject is also set and initialised. This causes my application to continue to subscribe to queues and so on. However shortly after the above call I will receive aConnectionShutdownevent which tells me that the credentials are wrong. From that moment on theIConnectionobject is alsoNull.This behaviour causes a lot of
NullReferenceExceptionsthroughout my application code. Ideally theCreateConnectionAsynccall will throw an exception immediately telling me that the credentials are wrong. This way I can abort the further subscribing to queues immediately.Kind regards,
Mathis
Beta Was this translation helpful? Give feedback.
All reactions