nestjs-aws-sqs
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

Nest Logo

Module for aws services (SQS CONSUMER)

Package License semantic-release

SQS CONSUMER NPM AWS SERVICES

install

yarn add @nestjs/microservices

import

main.ts

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import {MicroserviceOptions} from "@nestjs/microservices";
import {AwsCloudSqsServer} from "nestjs-aws-sqs";

async function bootstrap() {
    const app = await NestFactory.createMicroservice<MicroserviceOptions>(
        AppModule,
            {
                strategy: new AwsCloudSqsServer({
                    params:{
                        MaxNumberOfMessages: 1,
                        MessageAttributeNames: ["All"],
                        QueueUrl: "QueueUrl",
                        VisibilityTimeout: 30,
                        WaitTimeSeconds: 0,
                    },
                    conexion:{
                        channel: 'notificaions',
                        refresh: 500, // ms
                        region: 'region'
                    }
                }),
            },
    );
    app.listen(() => console.log('Microservice is listening'));
}
bootstrap();

Package Sidebar

Install

npm i nestjs-aws-sqs

Weekly Downloads

89

Version

1.2.4

License

MIT

Unpacked Size

33.2 kB

Total Files

38

Last publish

Collaborators

  • efraingaray