A resilient worker queue backed by MySQL. Version 3.0.0. Provides job persistence, priority, deduplication, concurrency, delayed jobs, and multi-process/server operation. Designed for high-throughput jobs (millions per day) with strong resilience to misbehaving jobs and dropped connections. Differentiators: leverages MySQL for queries and persistence, no additional infrastructure needed; dual ESM/CJS build with full TypeScript types. Not suitable for sub-second latency user-facing jobs. Released under MIT license.
npm install oxen-queue-v2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the queue, creates the MySQL table, adds a job, and sets up a worker process.
Ensure MySQL server version is 8.0 or higher.
Upgrade Node.js to version 14 or higher.
Replace queue.createTable() with Queue.createSchema(mysqlConfig).
Set uniqueKey to null or omit it explicitly if you do not want deduplication.
Pass { concurrency: 5 } in the Queue constructor options.Enable auto-reconnect in the mysqlConfig: { connectionLimit: 10, waitForConnections: true, enableKeepAlive: true }.Use import { Queue } from 'oxen-queue-v2' instead of import Queue from 'oxen-queue-v2'.Call await queue.createTable() (or the newer Queue.createSchema) before using the queue.
In mysqlConfig, set { authPlugins: { caching_sha2_password: true } } or use 'mysql_native_password' user.