Skip to content

Installation

Requirements

  • Bun v1.0 or later

Install from npm

Terminal window
bun add bunqueue

Install from source

Terminal window
git clone https://github.com/egeominotti/bunqueue.git
cd bunqueue
bun install
bun run build

Verify Installation

Embedded Mode

import { Queue, Worker } from 'bunqueue/client';
// Both Queue and Worker must have embedded: true
const queue = new Queue('test', { embedded: true });
const worker = new Worker('test', async (job) => {
console.log('Processing:', job.data);
return { success: true };
}, { embedded: true });
await queue.add('hello', { message: 'bunqueue is working!' });

Server Mode

Terminal window
# Start server
bunqueue start
# Check version
bunqueue --version

TypeScript Support

bunqueue is written in TypeScript and includes full type definitions:

import type {
Job,
JobOptions,
WorkerOptions,
StallConfig,
DlqConfig,
DlqEntry
} from 'bunqueue/client';

Next Steps