ssut / nestjs-sqs

A project to make SQS easier to use within NestJS, with decorator-based handling and seamless NestJS-way integration.
MIT License
214 stars 53 forks source link

Add support for useQueueUrlAsEndpoint for emulated sqs development #78

Closed kazazor closed 3 months ago

kazazor commented 7 months ago

Similar to what was done on sqs-consumer in version 9.1.0: https://github.com/bbc/sqs-consumer/pull/472, it's needed here.

An example is using LocalStack for local development, and with the new upgrade to use aws-sdk v3 you'll get a constant warning like this:

QueueUrl=http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/S3AssetsNotificationQueue-development differs from SQSClient resolved endpoint=https://sqs.us-east-1.amazonaws.com/, using QueueUrl host as endpoint.
Set [endpoint=string] or [useQueueUrlAsEndpoint=false] on the SQSClient.
yujiniii commented 7 months ago

Hello, I met the same issue. Add AWS_REGION to your env file

I hope it's resolved.

AWS_REGION='ap-northeast-2' # your region
kazazor commented 7 months ago

Thanks @yujiniii , in our case that won't help as we need the AWS to be set to a different value

Thanks for the help!

kazazor commented 3 months ago

This issue is not relevant anymore and the sqs-consumer package was updated and this option is now available:

useQueueUrlAsEndpoint: true,