Closed brzuchal closed 4 years ago
When connecting to RMQ fails ConnectionCloseFrame is handled but no exception in case of error is thrown.
ConnectionCloseFrame
amqp://test:test@localhost:5672/test
object(PHPinnacle\Ridge\Protocol\ConnectionCloseFrame)#866 (10) { ["replyCode"]=> int(530) ["replyText"]=> string(81) "NOT_ALLOWED - access to vhost '/test' refused for user 'test'" ["closeClassId"]=> int(10) ["closeMethodId"]=> int(40) ["classId"]=> int(10) ["methodId"]=> int(50) ["type"]=> int(1) ["channel"]=> int(0) ["size"]=> int(92) ["payload"]=> NULL }
The change is important for all users using non-default vhost.
vhost
Possible fix should add \trim($url['path'], '/') in Config::parse
\trim($url['path'], '/')
Config::parse
Hi, thank you for reported issue.
The main problem here that RabbitMQ allows create vhost with / in name. Something like /test//my/vhost/// is valid RabbitMQ vhost.
/
/test//my/vhost///
Detailed description
When connecting to RMQ fails
ConnectionCloseFrame
is handled but no exception in case of error is thrown.DSN
amqp://test:test@localhost:5672/test
ConnectionCloseFrame
Context
The change is important for all users using non-default
vhost
.Possible implementation
Possible fix should add
\trim($url['path'], '/')
inConfig::parse
Environment