Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pabermod opened this issue Dec 4, 2023 · 4 comments
Closed

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

pabermod opened this issue Dec 4, 2023 · 4 comments
Assignees
Labels
Milestone

Comments

@pabermod
Copy link

pabermod commented Dec 4, 2023

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

@pabermod pabermod added the bug label Dec 4, 2023
@lukebakken lukebakken self-assigned this Dec 4, 2023
@lukebakken lukebakken added this to the 6.8.0 milestone Dec 4, 2023
@lukebakken
Copy link
Contributor

lukebakken commented Dec 4, 2023

I have added your code here and am investigating:

https://github.com/lukebakken/rabbitmq-dotnet-client-1434

@lukebakken
Copy link
Contributor

@pabermod please take a look here. Thanks!

@lukebakken
Copy link
Contributor

Fixed by #1438

@lukebakken
Copy link
Contributor

@pabermod just FYI, 6.8.0 has officially been released. Announcing it soon.

lukebakken added a commit that referenced this issue Dec 11, 2023
Fixes #1441

Reference:
* #1434
* #1438
lukebakken added a commit that referenced this issue Dec 11, 2023
The original change in #1438 introduced a breaking API change, reported here:

addupsolutions/AddUp.FakeRabbitMQ#189
lukebakken added a commit that referenced this issue Dec 11, 2023
lukebakken added a commit that referenced this issue Dec 11, 2023
Fixes #1441

Reference:
* #1434
* #1438

Port changes from #1443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants