bunqueue v2.6.71
Fixes 6 bugs. BullMQ v5 prioritized state, bullMQ v5 waiting-children state, failParentOnFailure, flow atomicity and more.
To install bunqueue v2.6.71
Section titled “To install bunqueue v2.6.71”bun add bunqueue@2.6.71npm install bunqueue@2.6.71To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestBullMQ v5 prioritized state
Section titled “BullMQ v5 prioritized state”Jobs with priority > 0 now report state 'prioritized' instead of 'waiting', matching BullMQ v5 exactly. Affects getJobState(), getJobCounts(), Prometheus metrics, cloud snapshot, SSE/WebSocket events, and MCP adapter.
BullMQ v5 waiting-children state
Section titled “BullMQ v5 waiting-children state”Parent jobs in flows correctly report 'waiting-children' state while waiting for child jobs to complete.
failParentOnFailure
Section titled “failParentOnFailure”When a child job terminally fails with failParentOnFailure: true, the parent job is automatically moved to failed state. Handles race conditions where child fails before parent linkage is established.
Flow atomicity
Section titled “Flow atomicity”FlowProducer.add() and addBulk() now automatically roll back all created jobs if any part of the flow fails during creation.
FlowOpts with queuesOptions
Section titled “FlowOpts with queuesOptions”Pass per-queue default job options as second argument to flow.add(flowJob, { queuesOptions: { queueName: { attempts: 5 } } }).
FlowProducer extends EventEmitter
Section titled “FlowProducer extends EventEmitter”BullMQ v5 compatible. close() returns Promise<void>, closing property tracks shutdown, disconnect() alias.
Job move operations
Section titled “Job move operations”moveActiveToWait, changeWaitingDelay, moveToWaitingChildren state transitions with proper resource cleanup (concurrency slots, unique keys, group locks).
Changes
Section titled “Changes”- Documentation: Updated state machine diagrams, API types, FlowProducer guide, migration guide with BullMQ v5 parity tables, cloud contract with new snapshot fields.
Bugfixes
Section titled “Bugfixes”- TOCTOU in
moveParentToFailed: Re-checksjobIndexinside write lock to prevent duplicate DLQ entries when multiple children withfailParentOnFailurefail concurrently. - Unhandled promise rejections:
moveParentToFailedcalls now have.catch()handlers instead of fire-and-forgetvoid. - SQLite
queryJobs(state='prioritized'): Translates'prioritized'toWHERE state='waiting' AND priority > 0since SQLite never stores ‘prioritized’ as a state value. moveActiveToWaitresource leak: Now callsreleaseJobResources()to free concurrency/uniqueKey/group slots before re-queueing.- Move operations handle
prioritizedstate:moveJobToWaitandmoveJobToDelayednow correctly handle jobs in'prioritized'state. - Cloud snapshot: Added
prioritizedto stats and per-queue data. Per-queue data now usesfailedinstead ofdlq(BullMQ v5 compatible).
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.6.67 · Release on GitHub · Commits since v2.6.67 · Full changelog · All posts