Skip to content

When using assembly binding redirect a connection error is shown #1434

@pabermod

Description

@pabermod

Describe the bug

When I use assembly binding redirection for System.Runtime.CompilerServices.Unsafe, if a new version of that library is used through a dependency update, and if it does not match the used version, a BrokerUnreachableException is thrown instantly when trying to connect:

Error connecting to host rabbitmq-ssl. RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> System.IO.IOException: connection.start was never received, likely due to a network timeout
en RabbitMQ.Client.Framing.Impl.Connection.StartAndTune()
en RabbitMQ.Client.Framing.Impl.Connection.Open(Boolean insist)
en RabbitMQ.Client.Framing.Impl.Connection..ctor(IConnectionFactory factory, Boolean insist, IFrameHandler frameHandler, String clientProvidedName)
en RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)
--- Fin del seguimiento de la pila de la excepción interna ---

Reproduction steps

Download the attached solution and start the project.

RabbitMQRedirectAssembly.zip

The System.Runtime.CompilerServices.Unsafe dll is 5.0.0.0 version but in the redirect assembly is specified 6.0.0.0.

When connecting to rabbitmq there should be an exception that indicates that the dll was not found. but instead a BrokerUnreachable exception is shown

Expected behavior

When connecting to rabbitmq there should be an exception that indicates that the dll was not found

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions