nestjs-sqs-consumer
v1.0.2
Published
AWS SQS consumer for NestJS
Downloads
17
Readme
AWS SQS Consumer library for NestJS
Instructions
Install
npm install nestjs-sqs-consumer
Use library
Configure NestjsConsumerModule
- QueueUrl
- Handle message function
- Configure AWS credentials and region
import { NestjsSqsConsumerModule } from 'nestjs-sqs-consumer';
NestjsSqsConsumerModule.registerAsync({
imports: [],
useFactory: async () => ({
queueUrl: 'queueUrl',
handleMessage: 'handleMessageFunction'
sqsConfig: {
region: "aws_region",
credentials: {
accessKeyId: "aws_access_key_id",
secretAccessKey: "aws_secret_access_key",
},
},
}),
inject: [],
})