bunqueue 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +82 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -24,9 +24,45 @@
24
24
 
25
25
  ---
26
26
 
27
+ ## Why bunqueue?
28
+
29
+ > ⚠️ **Bun only** — bunqueue requires [Bun](https://bun.sh) runtime. Node.js is not supported.
30
+
31
+ **Every other job queue requires external infrastructure.** bunqueue doesn't.
32
+
33
+ | Library | Requires |
34
+ |---------|----------|
35
+ | BullMQ | ❌ Redis |
36
+ | Agenda | ❌ MongoDB |
37
+ | Bee-Queue | ❌ Redis |
38
+ | pg-boss | ❌ PostgreSQL |
39
+ | Celery | ❌ Redis/RabbitMQ |
40
+ | **bunqueue** | ✅ **Nothing. Zero. Nada.** |
41
+
42
+ bunqueue is the **only** job queue with:
43
+ - **BullMQ-compatible API** — Same `Queue`, `Worker`, `QueueEvents` you know
44
+ - **Zero external dependencies** — No Redis, no MongoDB, no nothing
45
+ - **Persistent storage** — SQLite survives restarts, no data loss
46
+ - **100K+ jobs/sec** — Faster than Redis-based queues
47
+ - **Single file deployment** — Just your app, that's it
48
+
49
+ ```bash
50
+ # Others: Install Redis, configure connection, manage infrastructure...
51
+ # bunqueue:
52
+ bun add bunqueue
53
+ ```
54
+
55
+ ```typescript
56
+ import { Queue, Worker } from 'bunqueue/client';
57
+ // That's it. You're done. Start queuing.
58
+ ```
59
+
60
+ ---
61
+
27
62
  ## Quick Install
28
63
 
29
64
  ```bash
65
+ # Requires Bun runtime (https://bun.sh)
30
66
  bun add bunqueue
31
67
  ```
32
68
 
@@ -462,6 +498,52 @@ Supported providers: AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces.
462
498
  | Multiple languages | **Server** (HTTP API) |
463
499
  | Horizontal scaling | **Server** |
464
500
 
501
+ ### Server Mode SDK
502
+
503
+ For communicating with bunqueue server from **separate processes**, use the [flashq](https://www.npmjs.com/package/flashq) SDK:
504
+
505
+ ```bash
506
+ bun add flashq
507
+ ```
508
+
509
+ ```typescript
510
+ import { FlashQ } from 'flashq';
511
+
512
+ const client = new FlashQ({ host: 'localhost', port: 6789 });
513
+
514
+ // Push job
515
+ await client.push('emails', { to: 'user@test.com' });
516
+
517
+ // Pull and process
518
+ const job = await client.pull('emails');
519
+ if (job) {
520
+ console.log('Processing:', job.data);
521
+ await client.ack(job.id);
522
+ }
523
+ ```
524
+
525
+ | Package | Use Case |
526
+ |---------|----------|
527
+ | `bunqueue/client` | Same process (embedded) |
528
+ | `flashq` | Different process (TCP client) |
529
+
530
+ ```
531
+ ┌─────────────────┐ ┌─────────────────┐
532
+ │ Your App │ │ Your App │
533
+ │ │ │ │
534
+ │ bunqueue/client│ │ flashq │
535
+ │ (embedded) │ │ (TCP client) │
536
+ └────────┬────────┘ └────────┬────────┘
537
+ │ │
538
+ │ ▼
539
+ │ ┌─────────────────┐
540
+ │ │ bunqueue server │
541
+ │ │ (port 6789) │
542
+ │ └─────────────────┘
543
+
544
+ Same process Different process
545
+ ```
546
+
465
547
  ---
466
548
 
467
549
  ## Architecture
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunqueue",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "High-performance job queue server written in Bun. SQLite persistence, cron scheduling, priorities, retries, DLQ, webhooks. Minimal dependencies.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",