Registry / database / oxen-queue

oxen-queue

JSON →
library0.1.12jsnpmunverified

oxen-queue v0.1.12 is a resilient worker queue backed by MySQL, designed for high-throughput job processing with features like persistence, priority, deduplication, concurrency, delayed jobs, and multi-process/server support. It is ideal for teams already running MySQL who need to process millions of jobs per day with SQL-queryable queues. Unlike alternatives like Bull or Kue, Oxen prioritizes throughput over low latency and handles dropped connections gracefully. It requires Node >=7 and a MySQL instance. Last release appears stable but low activity suggests maintenance mode.

npm install oxen-queue
INSTALL
IMPORT
SIG · OXEN-QUEUE
O
oxen-queue
databasejavascriptv0.1.12
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const Oxen = require('oxen-queue')
import Oxen from 'oxen-queue'
Package uses CommonJS only; ESM import will fail.
Oxen
const { Oxen } = require('oxen-queue')
const oxen = require('oxen-queue')
Default export is the constructor; named export does not exist. Use default import.
Oxen instance
new Oxen({ job_type: 'myqueue', mysql_config: {...} })
Oxen.create({...})
Only constructor pattern; no static factory methods.

Initializes Oxen queue, creates required MySQL table, adds a job, and processes jobs with a worker function.

const Oxen = require('oxen-queue'); async function main() { const ox = new Oxen({ mysql_config: { user: 'root', password: process.env.MYSQL_PASSWORD ?? 'password', host: 'localhost', database: 'test' }, job_type: 'example_queue' }); // Create table once await ox.createTable(); // Add a job await ox.addJob({ key: 'job1', priority: 10, payload: { task: 'send_email' } }); // Process jobs ox.process(async (job) => { console.log('Processing:', job.id, job.payload); // Do work return { status: 'done' }; }); // Start processing ox.start(); } main().catch(console.error);
Debug
Known issues
gotchaRequires Node >=7.0.0; older engines not supported.
fix
Upgrade Node.js to version 7 or higher.
affects: <7.0.0
gotchaQueue table must be created explicitly via createTable() before use.
fix
Run await ox.createTable() during setup.
affects: >=0.0.0
breakingDefault exports only; named imports will fail.
fix
Use const Oxen = require('oxen-queue') instead of destructuring.
affects: >=0.0.0
deprecatedPackage is in maintenance mode with no recent updates.
fix
Consider migrating to a more actively maintained queue library.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'oxen-queue'
Package not installed or module name misspelled.
fix
Run 'npm install oxen-queue' and ensure package.json includes it.
TypeError: Oxen is not a constructor
Using named import { Oxen } instead of default import.
fix
Use 'const Oxen = require('oxen-queue')'.
Error: ER_NO_SUCH_TABLE: Table '...oxen_queue' doesn't exist
createTable() must be called before queue operations.
fix
Call 'await ox.createTable()' once during initialization.
Upgrade
Version history
0.1.12latest on npm
Audit
Dependencies
mysqlrequiredRequired for MySQL database connection and query execution.
Agent activity
2 hits · last 30 days
node
2
Resources
oxen-queue — npm install oxen-queue · libregistry