Skip to content

queue aws Overview

GitHub Action edited this page Apr 21, 2026 · 2 revisions

@quatrain/queue-aws

The AWS SQS (Simple Queue Service) adapter for @quatrain/queue.

Introduction

Amazon SQS is a fully managed message queuing service. This adapter utilizes the AWS SDK v3 to send and long-poll messages, providing a serverless, highly scalable queueing backend for Quatrain workers.

Installation

npm install @quatrain/queue-aws @aws-sdk/client-sqs
# or
yarn add @quatrain/queue-aws @aws-sdk/client-sqs

Configuration

Register the adapter using your AWS IAM credentials.

import { Queue } from '@quatrain/queue'
import { SqsAdapter } from '@quatrain/queue-aws'

const sqsAdapter = new SqsAdapter({
    config: {
        accesskey: process.env.AWS_ACCESS_KEY_ID,
        secret: process.env.AWS_SECRET_ACCESS_KEY,
        region: process.env.AWS_REGION || 'eu-central-1',
        accountid: '1234567890',
        // Provide endpoint if using an SQS-compatible service (e.g. Scaleway Messaging)
        endpoint: 'https://sqs.eu-central-1.amazonaws.com'
    }
})

Queue.addAdapter('sqs', sqsAdapter, true)

Documentation

For concrete examples and usage guides, please refer to the How-To Guide.

License

AGPL-3.0-only

Clone this wiki locally