Nov 18, 20267 min read

BullMQ vs SQS: Redis Job Queue or Managed AWS Queue?

How BullMQ's Redis-backed jobs compare with Amazon SQS for Node.js background work, covering retries, delays, scheduling, priorities, operations and cost, and how to run queues in your own AWS account without managing either by hand.

Illustration for BullMQ vs SQS: Redis Job Queue or Managed AWS Queue?

BullMQ is the job queue most Node.js teams reach for: install the package, point it at Redis, call queue.add(), and a Worker picks the job up with retries, backoff and concurrency already handled. It works very well until the Redis instance holding every pending job becomes something you have to think about, because an eviction policy left on its default or a restart without persistence turns into lost jobs, and a busy queue competes for memory with whatever else lives in that Redis.

Amazon SQS takes the opposite approach: a managed queue with no server, billed per request, with fewer job features and a different programming model. This guide compares the two on delivery semantics, retries, delays, scheduling, operations and cost, and shows how to get managed queues in your own AWS account from TypeScript code.

BullMQ vs SQS at a Glance

EncoreBullMQAmazon SQS
What it isTopics and subscriptions declared in TypeScript or GoNode.js library on RedisManaged AWS queue service
Runs onSNS and SQS in your AWS account, Pub/Sub on GCPYour Redis (ElastiCache, Upstash, self-hosted)AWS
RetriesRetry policy per subscription, then a dead-letter queueAttempts with fixed or exponential backoffVisibility timeout and redrive to a dead-letter queue
Delays and schedulingCron jobs, managed by the Encore platformDelayed jobs of any length, job schedulersUp to 15 minutes delay
Priorities and flowsNoPriorities, rate limits, parent-child flowsNo
Fan-outSeveral subscriptions per topicOne queue per consumer groupSNS in front of several queues
OperationsNoneRedis memory, persistence and eviction policyNone
Local developmentencore run runs topics in-processLocal RedisLocalStack or a dev queue

Delivery, Retries and Failures

BullMQ moves a job through waiting, active, completed and failed states in Redis. A worker that throws marks the attempt failed, and the job is retried up to attempts times with the backoff you choose, then stays in the failed set where you can inspect and retry it. Stalled-job detection moves jobs back to waiting if a worker dies mid-job.

SQS hides a received message for its visibility timeout, and if the consumer does not delete it in time, it becomes visible and is delivered again. After maxReceiveCount deliveries, a redrive policy moves it to a dead-letter queue. Standard queues deliver at least once, so consumers must be idempotent, and FIFO queues add ordering per message group and deduplication within a five-minute window.

Delays, Scheduling and Priorities

BullMQ can delay a job by any amount, run repeatable jobs on a cron pattern through job schedulers, process higher-priority jobs first, rate-limit a queue, and model parent-child flows where a parent waits for its children. These are the features that make BullMQ attractive for user-facing workflows.

SQS supports a delivery delay of up to 15 minutes, and nothing beyond that: no priorities, no cron and no dependencies between messages. Teams use separate queues for priorities and EventBridge Scheduler for anything scheduled.

Operations and Cost

BullMQ is free and open source, with a paid Pro version for features such as groups. The cost is Redis: an ElastiCache or Upstash instance sized for peak queue depth, configured with maxmemory-policy noeviction and persistence, and monitored for memory and connection counts.

SQS costs $0.40 per million requests for standard queues after the first million each month, checked November 18, 2026, where each send, receive and delete counts as a request of up to 64 KB. There is nothing to size, patch or fail over, and retention is configurable up to 14 days.

How Does Encore Handle Background Jobs?

Encore

Encore is a backend framework with built-in infrastructure for TypeScript and Go, and its Pub/Sub primitive gives you managed queues without running Redis: a topic and its subscriptions are declared in code, encore run runs them in-process, and a deploy provisions an SNS topic with an SQS queue and a dead-letter queue per subscription in your own AWS account, or Pub/Sub on GCP.

Set up the app

Install the Encore CLI with the command for your system, then create the app:

Get started
brew install encoredev/tap/encore &&
encore app create
Copy

Run in your terminal to get started locally.

~
$ encore app create media --example=ts/hello-world$ cd media && mkdir -p videos/migrations

The migration creates a videos table with id, source_url, status (default 'queued') and attempts INT DEFAULT 0. The upload endpoint enqueues a transcode, and two subscriptions consume the same event independently, which in BullMQ would be two queues and two add() calls:

// videos/videos.ts import { api, APIError } from "encore.dev/api"; import { SQLDatabase } from "encore.dev/storage/sqldb"; import { Topic, Subscription } from "encore.dev/pubsub"; import log from "encore.dev/log"; const db = new SQLDatabase("videos", { migrations: "./migrations" }); interface VideoUploaded { videoId: number; } export const videoUploaded = new Topic<VideoUploaded>("video-uploaded", { deliveryGuarantee: "at-least-once", }); export const upload = api( { expose: true, method: "POST", path: "/videos" }, async ({ sourceUrl }: { sourceUrl: string }): Promise<{ id: number }> => { if (!sourceUrl.startsWith("https://")) { throw APIError.invalidArgument("sourceUrl must be an https URL"); } const row = await db.queryRow<{ id: number }>` INSERT INTO videos (source_url) VALUES (${sourceUrl}) RETURNING id`; await videoUploaded.publish({ videoId: row!.id }); return { id: row!.id }; }, ); // Like a BullMQ Worker with attempts and exponential backoff. const _transcode = new Subscription(videoUploaded, "transcode", { handler: async ({ videoId }) => { const v = await db.queryRow<{ source_url: string }>` UPDATE videos SET status = 'transcoding', attempts = attempts + 1 WHERE id = ${videoId} AND status IN ('queued', 'transcoding') RETURNING source_url`; if (!v) return; // already done await transcode(v.source_url); // throws on failure, so the message is retried await db.exec`UPDATE videos SET status = 'ready' WHERE id = ${videoId}`; }, retryPolicy: { minBackoff: "30s", maxBackoff: "10m", maxRetries: 5 }, ackDeadline: "10m", maxConcurrency: 4, }); // A second consumer of the same event, with its own queue and retries. const _notify = new Subscription(videoUploaded, "notify-uploader", { handler: async ({ videoId }) => { log.info("notify uploader", { videoId }); }, }); async function transcode(sourceUrl: string): Promise<void> { // Call your transcoder; writing the same output key twice is harmless. }
~/media
$ encore run$ curl -X POST localhost:4000/videos -d '{"sourceUrl":"https://example.com/in.mp4"}'{"id": 1}

A handler that throws is retried from 30 seconds up to 10 minutes between attempts and moved to the subscription's dead-letter queue after five retries, maxConcurrency caps how many transcodes run at once per instance, and ackDeadline gives each attempt ten minutes. Encore provisions the SNS topic, two SQS queues with their dead-letter queues and the subscriptions in your account, and Encore provisions an IAM role for the service. Repeatable jobs become cron jobs, which are managed by the Encore platform and do not run locally or in preview environments. There are no BullMQ-style priorities or parent-child flows, so jobs that depend on them need a status table or a separate topic per priority. A coding agent adding a third consumer writes one more Subscription in the same file, and encore run delivers events to it locally.

The database docs cover migrations, queries and transactions in more detail.

Best fit: TypeScript and Go teams that want background jobs with retries and dead-letter queues on managed AWS or GCP queues, with no Redis to operate.

BullMQ

BullMQ is the better fit when job-level features carry the product: priorities, long delays, per-user rate limits, repeatable jobs created at runtime, and parent-child flows, with a dashboard such as Bull Board for operators. It needs a Redis instance sized and configured for queue durability.

Best fit: Node.js apps with rich job semantics and a Redis the team already runs well.

Amazon SQS by Hand

Using SQS directly means creating queues and dead-letter queues with redrive policies, granting send, receive and delete permissions to each service's role, and writing consumers with the AWS SDK that long-poll, extend visibility for slow jobs and delete on success. It is reliable and cheap, and the plumbing is yours.

Best fit: AWS teams that want a managed queue and are comfortable writing consumers with the SDK.

How to Choose

Pick BullMQ when priorities, long delays and job flows are central and you will run Redis carefully. Pick SQS when a managed, durable queue matters more than job features. Pick Encore when you want SQS-backed queues with retries and dead-letter queues declared in your TypeScript or Go code and provisioned in your own AWS account.

Frequently asked questions

Should I use BullMQ or SQS?

Use BullMQ when you already run Redis, want job-level features such as priorities, long delays, repeatable jobs, rate limits and parent-child flows, and are happy to operate Redis for durability. Use SQS when you want a managed queue on AWS with no servers, dead-letter queues and retention measured in days, and can live with fewer job-level features.

Does BullMQ lose jobs?

Yes. Jobs can be lost if Redis is not configured for durability. BullMQ stores jobs in Redis, so its durability is Redis's durability. Redis must be configured with maxmemory-policy set to noeviction and persistence enabled, such as AOF, or jobs can be evicted or lost on a restart. A managed Redis with replication reduces the risk, and the configuration is still your responsibility.

How long can an SQS message be delayed?

SQS supports a delivery delay of up to 15 minutes per queue or per message on standard queues. Longer delays need a scheduler, such as EventBridge Scheduler creating a one-time schedule, or a database table polled by a scheduled job.

How do I add a background job queue to a TypeScript backend on AWS without running Redis?

With Encore, declare a Topic and a Subscription in TypeScript. encore run runs them locally, and on deploy Encore provisions an SNS topic with an SQS queue and a dead-letter queue per subscription in your AWS account, with retries configured on the subscription.

Deploy to your cloud on AWS and Google Cloud
without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders