-
Notifications
You must be signed in to change notification settings - Fork 3
this adapter doesn't work with dynamic namespace #7
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
Comments
Can you show more reproduction code? I'm not familiar with regex dynamic namespaces, but from a cursory read of the code I don't see a way that creating the publish channel would be dependent on the namespace name. |
client side code:
server side code
just run rabbitmq or redis and uncomment related code to see what happens for more info about dynamic namespaces read this link on socket.io documentation |
when using dynamic namespaces (using regex), amqp adapter throws an error in line 167 of index.ts
this.publishChannel.assertExchange(this.exchangeName, 'direct', { autoDelete: true, durable: false });
it says can access
assertExchange
ofundfined
After checking the code a bit, I realized that when connecting the client to the socket server with different namespaces, the client tries to communicate with the
/
namespace and this causes an error. In case I did not intend to connect to the/
namespace. The problem was solved by placing the two methodscreateRoomExchangeAndQueue
andcreateRoomListener
inside thetry/catch
blockThe text was updated successfully, but these errors were encountered: