Closed evolvedlight closed 11 months ago
I plan to open a PR for this on the weekend, let me know if you don't consider this a bug.
Good catch! Thank you for reporting this. A PR is very welcome. If you'd like to base it on the 6.x
branch I will then forward-merge your changes. main
has diverged quite a bit.
Describe the bug
if you connect to two RabbitMq instances, one with EXTERNAL auth, one plain, and change the Auth Mechanisms, the instances change each other.
Reproduction steps
Expected behavior
I expect to have a single Plain Auth mechanism Instead I have Zero auth mechanisms
Additional context
It's because the DefaultAuthMechanisms is referenced by reference rather than making a copy of it. This bug is triggered by MassTransit: https://github.com/MassTransit/MassTransit/blob/15c44ca0c26e9dfcedbdf3e770621c5f3ceb6975/src/Transports/MassTransit.RabbitMqTransport/RabbitMqTransport/RabbitMqAddressExtensions.cs#L65