v0.2

Typed queues, messaging, pub/sub & streams. Without losing what makes each broker special.

One consistent lifecycle and message model for BullMQ, Kafka, RabbitMQ, Redis, NATS, and SQS — with provider-native options, responses, and acknowledgements preserved through the types.

Node 20+BunDeno 2+TypeScript strictZero lock-in

Install once, add only the SDK you use

sh
npm install @mohamedhabibwork/queuekit kafkajs

Every broker SDK is an optional peer dependency. If one is missing, QueueKit throws a QueueConfigError with the exact install command.

Quick start

ts
import { createQueue } from '@mohamedhabibwork/queuekit';

const kafka = await createQueue({
  type: 'kafka',
  clientId: 'orders-api',
  brokers: ['localhost:9092'],
});

await kafka.publish('orders.created', {
  payload: { orderId: 'ord_123' },
}, {
  native: { partition: 2, headers: { source: 'api' } },
});

Provider-native options live under native: BullMQ options can never be accidentally passed to Kafka, and vice versa.

Providers

Why it looks like this

Honest

Capabilities, not illusions

A provider advertises only what its broker really supports. Kafka partitions never masquerade as priority.

Typed

Native types flow through

Options, publish results, incoming messages, and acknowledgements keep their provider-native types.

Testable

In-memory fake driver

Deterministic delivery, delays, retries, and dead letters with waitUntilIdle() and flush() controls.

Neutral

Runtime-neutral core

The core never imports a broker SDK and runs on Node 20+, Bun, and Deno 2+.

Guarantees. QueueKit does not claim universal exactly-once delivery. Delivery, retry, ordering, acknowledgement, and dead-letter behavior are broker-specific — use capabilities, provider-native configuration, and idempotent consumers. message.metadata is application-only and is never sent to a broker.