-
Notifications
You must be signed in to change notification settings - Fork 11
Fix bug when connecting to the same stream name different vhosts #246
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
Fix bug when connecting to the same stream name different vhosts #246
Conversation
|
The failing test is also broken on |
|
Hello, thanks a lot for taking the time to open the pr. We will check it and will comment it in the following days. |
|
@david-mohr can you please rebase your branch? we fixed the failing pipeline, so it should be correct now. |
3ced3c3 to
bd064e3
Compare
bd064e3 to
3cffc16
Compare
|
I ran the tests locally using node v20 and they passed, so this failing test is unexpected... |
|
@l4mby I tried adding a minor change to re-trigger the CI tests and now a different test is failing. I don't think these are related to my change and running the tests locally everything still passes. Not sure how to proceed from here... any advice is welcome. |
During testing, we ran into a problem where we would create two connections to different vhosts, each with the same stream name. We could see in the RabbitMQ management interface that the configuration is valid and accessing them individually would work as expected, but when trying to access them at the same time, we would get messages leaking into the wrong vhost.
After debugging the issue, I tracked the root cause to the
ConnectionPool.getCacheKeyfunction which would build a cache using only the stream name, not the vhost. This meant that we were always getting the cached copy regardless of the actual vhost.All the other changes are to support that one change and there is a test to confirm the result.