Skip to content
Get started
Get started
JobOptions Reference
View Markdown
guide · queue

Every option, with its default.

The complete per-job option surface, what each field changes, and what you get when you leave it out.

Pass options with each add. The field names follow the host language while the broker receives the same values:

await queue.add('report', data, {
priority: 10,
delay: 5000,
attempts: 5,
jobId: 'report-42',
durable: true,
});

Python uses snake_case keyword arguments and Rust uses snake_case struct fields. Go uses a JobOptions map; PHP and Elixir use the camelCase protocol names shown in the table.

OptionTypeDefaultDescription
prioritynumber0Higher = processed first
delaynumber0Delay in ms before processing
attemptsnumber3Max total executions, first run included (3 = 1 run + 2 retries)
backoffnumber | { type, delay }1000Backoff base in ms, or { type: 'fixed' | 'exponential', delay }
timeoutnumber-Processing timeout in ms
jobIdstring-Custom ID for idempotent adds
deduplicationobject-TTL-based dedup (id, ttl, extend, replace)
removeOnCompletebooleanfalseAuto-delete after completion
removeOnFailbooleanfalseAuto-delete after failure
stallTimeoutnumber-Per-job stall timeout override
repeatobject-Repeating job config (every, pattern, limit)
durablebooleanfalseSQLite: bypass its write buffer; PostgreSQL is already transactional
lifobooleanfalseProcess newest first
group{ id, priority?, maxSize? }-Assign a fair job group, optional 0-first intra-group priority, and atomic pending-depth cap
parent{ id, queue }-Parent job reference for flows
stackTraceLimitnumber10Max stacktrace lines stored per failure
keepLogsnumber-BullMQ-compat metadata: stored on the job, not applied automatically. Log trimming happens only when a clear-logs call passes its own keepLogs
timestampnumbernowOverride the job’s creation timestamp (createdAt)
failParentOnFailurebooleanfalseFlow: a terminal child failure fails the parent
continueParentOnFailurebooleanfalseFlow: parent continues despite this child’s terminal failure
ignoreDependencyOnFailurebooleanfalseFlow: parent ignores this failed child’s dependency
removeDependencyOnFailurebooleanfalseFlow: remove this child from the parent’s dependencies on failure
sizeLimitnumber-BullMQ-compat metadata: stored on the job, not enforced by the broker
debounce{ id, ttl }-Legacy BullMQ alias: stored on the job, not enforced — use deduplication

At the same priority, LIFO jobs run newest-first ahead of FIFO jobs. Priority always remains authoritative, so a lower-priority LIFO job cannot overtake a higher-priority FIFO job.

The top-level priority rule above applies to ungrouped jobs. For grouped jobs, put priority inside group: group.priority accepts integers from 0 through 2,097,151, where 0 is highest and positive values run in ascending order. group.maxSize must be a positive safe integer. A full group rejects a single add or an atomic flow admission. PostgreSQL bulk adds are transactional; embedded memory/SQLite bulk adds can retain the jobs accepted before the one that exceeds the cap, then throw. See group admission semantics.

Processing timeout values are measured from the active transition and use an absolute next-deadline timer. Concurrent jobs retain their individual deadlines. The broker’s timeout transition is authoritative: a processor outcome that arrives afterward is ignored for that exact lease generation, without emitting a contradictory local Worker event. A later retry uses a new lease and is not suppressed.

parent creates a real dependency edge to an existing pending job. The parent moves to waiting-children, runs only after every linked child finishes, and exposes child results through getChildrenValues(). This works across queues and is committed atomically in both embedded and TCP modes, including addBulk(). A missing, active, completed, or failed parent rejects the child; the rejected child is not left in the selected memory, SQLite, or PostgreSQL backend. Use FlowProducer when the parent and children must all be created as one new graph.

GuideWhat it covers
Queue APICreate a queue in embedded or TCP mode
Adding Jobsadd, addBulk, priorities, delays, durability
Deduplication and Idempotent Job AddsIdempotent adds, dedup keys, custom job ids
Querying JobsFetch jobs, states, counts and results
Queue Control and MaintenancePause, drain, obliterate, clean and repair
Progress, Job Logs and DependenciesProgress, per-job logs and dependencies
Queue Rate Limiting and Global ConcurrencyRate limits and global concurrency caps
Job Schedulers from the QueueNamed repeatable schedules from the queue
DLQ Operations from the Queue ObjectFailed-job operations from the Queue object
Workers, Stats and Metrics from the QueueRegistered workers, stats and metrics windows
Namespaces, Auto-Batching and Store-and-ForwardNamespaces, auto-batching, store-and-forward