Foo-Foo-MQ / foo-foo-mq

Abstractions around RabbitMQ
MIT License
49 stars 24 forks source link

Connection fails when using uri property with plain auth #14

Closed mrdowns closed 4 years ago

mrdowns commented 4 years ago

When trying to connect to rabbit using the uri property of the connection object, if you've specified the username and password in the uri itself using plain auth, the connection fails. This is because new url.URL(string) doesn't return auth as a parameter, but you're still trying to reference it in the code. It instead returns username and password properties.

https://nodejs.org/docs/latest-v10.x/api/url.html#url_constructor_new_url_input_base

https://github.com/Foo-Foo-MQ/foo-foo-mq/blob/master/src/amqp/connection.js#L62

zlintz commented 4 years ago

Thank you for reaching out and opening the issue.

Once merged https://github.com/Foo-Foo-MQ/foo-foo-mq/pull/15 should address this and I will indicate the released version that includes the fix in this issue.

Also if you happen to encounter an issue again in the future and you know how to fix it. Feel free to open a pull request.

zlintz commented 4 years ago

@mrdowns v4.0.4 is released with this fix, please let us know if this still doesn't work for you

mrdowns commented 4 years ago

The fix works great - thanks so much for the speedy response!