I'm trying to connect to a Rabbit MQ docker container using NestJS microservice. I'm running it using vagrant. This is the error I'm getting:
[1601171008162] ERROR (32761 on local): Disconnected from RMQ. Trying to reconnect.
context: "Server"
trace: ""
[1601171008163] ERROR (32761 on local):
context: "Server"
trace: ""
msg: {
"err": {
"cause": {},
"isOperational": true
}
}
This is the server config.
{
transport: Transport.RMQ,
options: {
urls: ['amp://username:[email protected]:5672'],
queue: 'test_queue',
queueOptions: {
durable: true
},
noAck: true,
prefetchCount: 1
}
}
I've been trying to figure this out for over a week. Any help would be appreciated.
I ran into this issue, and the cause was an improperly formed virtual host within RabbitMQ. I was reading
amqp://localhost:5672/examplein code and configured my virtual host as/exampleinstead of justexample. That resolved the issue for me, hope this helps someone!