nestjs-sqs icon indicating copy to clipboard operation
nestjs-sqs copied to clipboard

Connection to SQS does not recover?

Open thehappycoder opened this issue 3 years ago • 5 comments

After an app loses connection with SQS, it's unable to recover it once the Internet connection is back.

I've noticed this when I left my app running on my laptop overnight (with wifi off) and opened it in the morning to find this:

Error   01/03/2021, 22:00:18 /Users/anton/projects/****/tail/node_modules/sqs-consumer/dist/consumer.js:45
    const sqsError = new errors_1.SQSError(message);
                     ^ - {"stack":[null]}
Error   01/03/2021, 22:00:18 SQSError: SQS receive message failed: Inaccessible host: `sqs.ap-southeast-2.amazonaws.com'. This service may not be available in the `ap-southeast-2' region.
    at toSQSError (/Users/anton/projects/****/tail/node_modules/sqs-consumer/dist/consumer.js:45:22)
    at Consumer.receiveMessage (/Users/anton/projects/****/tail/node_modules/sqs-consumer/dist/consumer.js:155:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:94:5) - {"stack":[null]}

This is fine but when the wifi is back on, and I push events to the queue, the app doesn't seem to be consuming anything.

thehappycoder avatar Mar 01 '21 20:03 thehappycoder