
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@nbdn/nestjs-sqs
Advanced tools
**Forked from [this repo](https://github.com/ssut/nestjs-sqs)**
Forked from this repo
Tested with: AWS SQS and ElasticMQ.
Nestjs-sqs is a project to make SQS easier to use and control some required flows with NestJS. This module provides decorator-based message handling suited for simple use.
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.
$ npm i --save @nbdn/nestjs-sqs
Just register this module:
@Module({
imports: [
SqsModule.register({
consumers: [],
producers: [],
}),
],
})
class AppModule {}
Quite often you might want to asynchronously pass module options instead of passing them beforehand.
In such case, use registerAsync()
method like many other Nest.js libraries.
SqsModule.registerAsync({
useFactory: () => {
return {
consumers: [],
producers: [],
};
},
});
SqsModule.registerAsync({
useClass: SqsConfigService,
});
SqsModule.registerAsync({
imports: [ConfigModule],
useExisting: ConfigService,
});
You need to decorate methods in your NestJS providers in order to have them be automatically attached as event handlers for incoming SQS messages:
import { Message } from '@aws-sdk/client-sqs';
@Injectable()
export class AppMessageHandler {
@SqsMessageHandler(/** name: */ 'queueName', /** batch: */ false)
public async handleMessage(message: Message) {}
@SqsConsumerEventHandler(/** name: */ 'queueName', /** eventName: */ 'processing_error')
public onProcessingError(error: Error, message: Message) {
// report errors here
}
}
export class AppService {
public constructor(
private readonly sqsService: SqsService,
) { }
public async dispatchSomething() {
await this.sqsService.send(/** name: */ 'queueName', {
id: 'id',
body: { ... },
groupId: 'groupId',
deduplicationId: 'deduplicationId',
messageAttributes: { ... },
delaySeconds: 0,
});
}
}
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.
FAQs
**Forked from [this repo](https://github.com/ssut/nestjs-sqs)**
The npm package @nbdn/nestjs-sqs receives a total of 0 weekly downloads. As such, @nbdn/nestjs-sqs popularity was classified as not popular.
We found that @nbdn/nestjs-sqs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.