@robertoaraneda/nestjs-sqs
v1.0.0
Published
AWS SQS module for NestJS
Downloads
4
Readme
AWS SQS Consumer library for NestJS
Instructions
Install
npm install @robertoaraneda/nestjs-sqs
Use library
Configure NestjsConsumerModule
- QueueUrl
- Handle message function
- Configure AWS credentials and region
import { NestjsSqsConsumerModule } from '@robertoaraneda/nestjs-sqs';
NestjsSqsModule.forRootAsync({
imports: [ConfigModule],
useFactory: async (configService: ConfigService /**if use configservice to get env vars */) => ({
queueUrl: "string", // optional
queueName: "string", // optional
snsConfig: {
region: "aws_region",
credentials: {
accessKeyId: "aws_access_key_id",
secretAccessKey: "aws_secret_access_key",
},
},
}),
inject: [ConfigService],
})