Closed ProductOfAmerica closed 2 years ago
Please provide a minimum reproduction repository.
@jmcdo29 Sorry about that. Ended up figuring it out... for some reason you need to add a query param of 'hearbeat' to the URL string. So turning my URL from this: amqps://username:password@hawk.rmq.cloudamqp.com/username
to this: amqps://username:password@hawk.rmq.cloudamqp.com/username?heartbeat=30
fixed the issue. I have no idea why this is a requirement, and it's completely undocumented.
Is there an existing issue for this?
Current behavior
Right now, if I try to connect to
amqp://localhost:5672
everything works fine. However, if I change my URL to a managed/hosted URL (for exampleamqps://username:password@hawk.rmq.cloudamqp.com/username
) I get a connection refuse error. I'm positive my username/password are correct.If I try using the module
this.client.connect()
method:I get this error:
UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".
If I try it without, I get this error:
I don't understand why this:
url: 'amqp://localhost'
is in the error, when I specifically specify the correct managed URL.Minimum reproduction code
None, see above code
Steps to reproduce
None, see above code
Expected behavior
The service should be able to connect to a managed server.
Package
Other package
No response
NestJS version
No response
Packages versions
Node.js version
No response
In which operating systems have you tested?
Other
No response