![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@ssut/nestjs-sqs
Advanced tools
[![Test](https://github.com/ssut/nestjs-sqs/workflows/Test/badge.svg)](https://github.com/ssut/nestjs-sqs/actions?query=workflow%3ATest) [![npm version](https://badge.fury.io/js/%40ssut%2Fnestjs-sqs.svg)](https://badge.fury.io/js/%40ssut%2Fnestjs-sqs)
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 @ssut/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
[![Test](https://github.com/ssut/nestjs-sqs/workflows/Test/badge.svg)](https://github.com/ssut/nestjs-sqs/actions?query=workflow%3ATest) [![npm version](https://badge.fury.io/js/%40ssut%2Fnestjs-sqs.svg)](https://badge.fury.io/js/%40ssut%2Fnestjs-sqs)
The npm package @ssut/nestjs-sqs receives a total of 71,613 weekly downloads. As such, @ssut/nestjs-sqs popularity was classified as popular.
We found that @ssut/nestjs-sqs demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.