Gathering detailed insights and metrics for @pickk/nest-sqs
Gathering detailed insights and metrics for @pickk/nest-sqs
Gathering detailed insights and metrics for @pickk/nest-sqs
Gathering detailed insights and metrics for @pickk/nest-sqs
npm install @pickk/nest-sqs
Typescript
Module System
Node Version
NPM Version
TypeScript (88.54%)
JavaScript (7.5%)
Shell (3.95%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
54 Commits
1 Branches
3 Contributors
Updated on Jan 28, 2023
Latest Version
2.0.7
Package Id
@pickk/nest-sqs@2.0.7
Unpacked Size
25.04 kB
Size
7.30 kB
File Count
20
NPM Version
6.14.13
Node Version
14.17.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
@pickk/nest-sqs is forked version of @ssut/nestjs-sqs
This library internally uses bbc/sqs-producer and bbc/sqs-consumer, and implements some more useful features on top of the basic functionality given by them. this library is only for Amazon SQS.
1$ npm i --save @pickk/nest-sqs
For use @pickk/nest-sqs You have to perform two methods to register a module. First you have to register Amazon SQS config options.
1@Module({ 2 imports: [ 3 SqsModule.forRootAsync({ 4 imports:[ConfigModule], 5 useFactory:(configService)=>{ 6 // return SQS.Types.ClientConfiguration & accountNumber(string type) 7 return {...} 8 }, 9 injects:[ConfigSerivce] 10 }), 11 ], 12}) 13class AppModule {}
Second you have to register queues.
1SqsModule.registerQueues([ 2 { 3 name: 'queueName', 4 type: 'ALL' // 'ALL'|'CONSUMER'|'PRODUCER' 5 consumerOptions?: {}, 6 producerOptions?: {} 7 }, 8 ... 9]);
You need to decorate methods in your NestJS providers in order to have them be automatically attached as event handlers for incoming SQS messages:
1@SqsProcess(/** name: */'queueName) 2export class AppMessageHandler { 3 @SqsMessageHandler(/** batch: */ false) 4 public async handleMessage(message: AWS.SQS.Message) {} 5 6 @SqsConsumerEventHandler(/** eventName: */ SqsConsumerEvent.PROCESSING_ERROR) 7 public onProcessingError(error: Error, message: AWS.SQS.Message) { 8 // report errors here 9 } 10}
One class can only handle one queue. so if you want to enroll dead letter queue, you have to make new class that handle dead letter queue
1export class AppService { 2 public constructor( 3 private readonly sqsService: SqsService, 4 ) { } 5 6 public async dispatchSomething() { 7 await this.sqsService.send(/** name: */ 'queueName', { 8 id: 'id', 9 body: { ... }, 10 groupId: 'groupId', 11 deduplicationId: 'deduplicationId', 12 messageAttributes: { ... }, 13 delaySeconds: 0, 14 }); 15 } 16}
See here, and note that we have same configuration as bbc/sqs-consumer's.
In most time you just need to specify both name
and queueUrl
at the minimum requirements.
This project is licensed under the terms of the MIT license.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
28 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More