I started to use rabbit.js to connect to RabbitMQ from a node.js application.
I'm blocked at:
Error: Channel closed by server: 403 (ACCESS-REFUSED) with message "ACCESS_REFUSED -operation not permitted on the default exchange"
at Channel.C.accept (/.../rabbit.js/node_modules/amqplib/lib/channel.js:398:24)
at Connection.mainAccept [as accept] (/.../rabbit.js/node_modules/amqplib/lib/connection.js:63:33)
at Socket.go (/.../rabbit.js/node_modules/amqplib/lib/connection.js:448:48)
at Socket.EventEmitter.emit (events.js:92:17)
...
which is expected, since the instance of RabbitMQ I use is configured to require the publishers and subscribers to provide credentials before being able to use the message queue, and guest account is disabled.
The official documentation of rabbit.js has no mention of credentials. Google searches for “rabbit.js specify credentials” and “rabbit.js login password” were inconclusive.
Are credentials supported by rabbit.js? If not, what other RabbitMQ clients for node.js support them?
So I never used rabbit.js myself, but after diving into the code, it seems to be using amqplib. The code that parses it can be seen here and it seems it's calling the standard nodejs URL module. So perhaps you can try something like this:
amqp://user:[email protected]/vhost
Hope it helps!
Cheers.