Skip to content

basalt / queue-sqs/src / sqsQueuePlugin

Function: sqsQueuePlugin() ​

> sqsQueuePlugin(options): BasaltPlugin<unknown>

Defined in: queue-sqs/src/index.ts:371

The SQS-backed queue plugin — one line to put an app's jobs on SQS:

ts
sqsQueuePlugin({ queueUrlFor: (q) => `${process.env.SQS_PREFIX}${q}`, jobs: [SendWelcome], workers: [{ queue: 'welcome' }] })

Every backend ships a plugin of this shape (bullmqQueuePlugin, rabbitmqQueuePlugin, kafkaQueuePlugin), so no backend is privileged in the core's API and @basaltkit/queue stays a pure contract. Use queuePlugin({ driver }) directly for a driver you wrote yourself.

Building the driver here, when the app is DEFINED, is safe: the constructor only reads defaults, and every connection is opened lazily on first use.

Parameters ​

options ​

SqsQueuePluginOptions

Returns ​

BasaltPlugin<unknown>

Released under the MIT License.