Skip to content

basalt / queue-sqs/src / SqsQueueDriver

Class: SqsQueueDriver ​

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

Amazon SQS driver for @basaltkit/queue. SQS has native per-message delay (up to 15 min) but no priority, which its capabilities reflect honestly — a priority dispatch is caught by the queue's onUnsupported policy.

Retries and backoff are handled at the app level for parity with the other drivers: on failure the message is re-sent with an incremented attempt and a DelaySeconds backoff (clamped to 15 min); an exhausted job is sent to the dead-letter queue (<queue><deadSuffix>). Provide a queueUrl resolver mapping queue names — including the DLQ — to their SQS URLs.

Implements ​

Constructors ​

Constructor ​

> new SqsQueueDriver(options): SqsQueueDriver

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

Parameters ​

options ​

SqsDriverOptions

Returns ​

SqsQueueDriver

Properties ​

capabilities ​

> readonly capabilities: DriverCapabilities

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

What this backend honors — see DriverCapabilities.

Implementation of ​

QueueDriver.capabilities


name ​

> readonly name: "sqs" = 'sqs'

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

Short identifier used in diagnostics (e.g. 'bullmq', 'sync').

Implementation of ​

QueueDriver.name

Methods ​

add() ​

> add(queue, jobName, data, options): Promise&lt;void&gt;

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

Parameters ​

queue ​

string

jobName ​

string

data ​

unknown

options ​

AddJobOptions

Returns ​

Promise&lt;void&gt;

Implementation of ​

QueueDriver.add


close() ​

> close(): Promise&lt;void&gt;

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

Returns ​

Promise&lt;void&gt;

Implementation of ​

QueueDriver.close


setExecutor() ​

> setExecutor(executor): void

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

Called once by the QueueManager — how to execute a received job.

Parameters ​

executor ​

JobExecutor

Returns ​

void

Implementation of ​

QueueDriver.setExecutor


startWorker() ​

> startWorker(queue, options?): void

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

Starts a worker for the queue (no-op in the sync driver: add executes inline).

Parameters ​

queue ​

string

options? ​
concurrency? ​

number

Returns ​

void

Implementation of ​

QueueDriver.startWorker

Released under the MIT License.