Skip to content

Conversation

@david-mohr
Copy link
Contributor

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.getCacheKey function 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.

@david-mohr
Copy link
Contributor Author

The failing test is also broken on main, so I have ignored it

@l4mby
Copy link
Contributor

l4mby commented Apr 9, 2025

Hello, thanks a lot for taking the time to open the pr. We will check it and will comment it in the following days.
Yes we are leaving that test on purpose, so it can be ignored.
Thank you again.

l4mby
l4mby previously approved these changes Apr 23, 2025
@l4mby
Copy link
Contributor

l4mby commented Apr 24, 2025

@david-mohr can you please rebase your branch? we fixed the failing pipeline, so it should be correct now.

@david-mohr david-mohr force-pushed the fix/same-stream-different-vhost branch from bd064e3 to 3cffc16 Compare April 24, 2025 08:27
@david-mohr
Copy link
Contributor Author

I ran the tests locally using node v20 and they passed, so this failing test is unexpected...

@david-mohr
Copy link
Contributor Author

@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.

@l4mby l4mby merged commit 6ac0eb0 into coders51:main Apr 28, 2025
4 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants