Amazon SQS
SQS is a fully managed queue provider from AWS that's officially supported by @node-ts/bus. Once configured, @node-ts/bus will automatically create all SNS topics, SQS queues and manage subscriptions for the handlers of your application.

Installation

Install the @node-ts/bus-sqs package
1
npm install @node-ts/bus-sqs
Copied!
Configure the transport and provide this to the bus configuration
1
import { Bus } from '@node-ts/bus-core'
2
import { SqsTransport, SqsTransportConfiguration } from '@node-ts/bus-sqs'
3
​
4
const sqsConfiguration: SqsTransportConfiguration = {
5
awsRegion: AWS_REGION,
6
awsAccountId: AWS_ACCOUNT_ID,
7
queueName: 'service-queue',
8
deadLetterQueueName: `service-queue-dead-letter`
9
}
10
const sqsTransport = new SqsTransport(sqsConfiguration)
11
await Bus
12
.configure()
13
.withTransport(sqsTransport)
14
.initialize()
Copied!
​
Last modified 7mo ago
Copy link
Contents
Installation