@nest-batch/aws-sqs
v0.2.1
Published
AWS SQS transport adapter for @nest-batch/core.
Readme
@nest-batch/aws-sqs
AWS SQS transport adapter for @nest-batch/core.
Korean: README.ko.md
Install
pnpm add @nest-batch/core @nest-batch/aws-sqsInstall and provide the AWS SDK client wrapper used by your application.
Public Imports
import { SqsAdapter, SqsExecutionStrategy, type SqsModuleOptions } from '@nest-batch/aws-sqs';Wiring
import { SqsAdapter } from '@nest-batch/aws-sqs';
NestBatchModule.forRoot({
adapters: {
persistence: persistenceAdapter,
transport: SqsAdapter.forRoot({
client: sqsClient,
queueUrl: process.env.BATCH_QUEUE_URL,
fifo: true,
workerCommand: ['node', 'dist/batch-worker.js'],
}),
},
});The adapter serializes a batch work message and sends it to SQS. Your worker runtime is responsible for receiving the SQS message and invoking the batch worker command.
