# Qified Task and Message Queues with Multiple Providers Source Index: https://qified.org/llms.txt ## Documentation ### qified URL: https://qified.org/docs/ [![tests](https://github.com/jaredwray/qified/actions/workflows/tests.yaml/badge.svg)](https://github.com/jaredwray/qified/actions/workflows/tests.yaml) [![GitHub license](https://img.shields.io/github/license/jaredwray/qified)](https://github.com/jaredwray/qified/blob/main/LICENSE) [![codecov](https://codecov.io/gh/jaredwray/qified/graph/badge.svg?token=jcRdy8SkOG)](https://codecov.io/gh/jaredwray/qified) [![npm](https://img.shields.io/npm/dm/qified)](https://npmjs.com/package/qified) [![npm](https://img.shields.io/npm/v/qified)](https://npmjs.com/package/qified) # qified Task and Message Queues with Multiple Providers # Features * Simple Message Queue for Processing Messages * Simple Message Format `Message` * Easily Send a Message `publish()` * Easily Subscribe to a message Queue `subscribe()` * Simple Task Format `Task` * Easily Send a Task `enqueue()` * Easily Subscribe to a Task Queue `dequeue()` * Ack / Reject / Extend in the handler via `TaskContext` * Async/Await Built In By Default * Written in Typescript, Nodejs Last Two Versions, ESM and CJS * Events and Hooks for all major actions via [Hookified](https://hookified.org) * Provider Fail Over Support # Table of Contents - [Installation](#installation) - [Quick Start](#quick-start) - [Constructor](#constructor) - [Properties](#properties) - [Methods](#methods) - [subscribe](#subscribe) - [publish](#publish) - [unsubscribeMessage](#unsubscribemessage) - [enqueue](#enqueue) - [dequeue](#dequeue) - [unsubscribeTask](#unsubscribetask) - [disconnect](#disconnect) - [Events](#events) - [Available Events](#available-events) - [Listening to Events](#listening-to-events) - [Error Handling with Events](#error-handling-with-events) - [Hooks](#hooks) - [Available Hooks](#available-hooks) - [Using Hooks](#using-hooks) - [Modifying Data with Before Hooks](#modifying-data-with-before-hooks) - [Modifying Topics with Before Hooks](#modifying-topics-with-before-hooks) - [Multiple Hooks](#multiple-hooks) - [Hooks vs Events](#hooks-vs-events) - [Providers](#providers) - [Development and Testing](#development-and-testing) - [License](#license) # Installation ```bash pnpm add qified ``` # Quick Start ```js import { Qified, MemoryMessageProvider } from 'qified'; // Create a new Qified instance with a memory provider const qified = new Qified({ messageProviders: new MemoryMessageProvider() }); // Subscribe to a topic await qified.subscribe('notifications', { id: 'notificationHandler', handler: async (message) => { console.log('Received:', message.data); } }); // Publish a message await qified.publish('notifications', { id: 'msg-1', data: { text: 'Hello, World!' } }); // Clean up await qified.disconnect(); ``` # Constructor ```js new Qified(options?: QifiedOptions) ``` **Options:** - `messageProviders?: MessageProvider | MessageProvider[]` - a provider or Array of message providers to use - `taskProviders?: TaskProvider[]` - Array of task providers to use **Example:** ```js import { Qified, MemoryMessageProvider } from 'qified'; const qified = new Qified({ messageProviders: new MemoryMessageProvider() }); ``` # Properties ### `messageProviders: MessageProvider[]` Get or set the array of message providers. This property allows you to dynamically manage which message providers are active in your Qified instance. **Type:** `MessageProvider[]` **Access:** Read/Write **Description:** - **Getter**: Returns the current array of message providers being used - **Setter**: Replaces all current message providers with a new array **Use Cases:** - Inspect which providers are currently configured - Add or remove providers dynamically at runtime - Replace all providers with a new set - Migrate from one provider to another **Example:** ```typescript import { Qified, MemoryMessageProvider } from 'qified'; import { NatsMessageProvider } from '@qified/nats'; import { RedisMessageProvider } from '@qified/redis'; const qified = new Qified({ messageProviders: new MemoryMessageProvider() }); // Get current providers const providers = qified.messageProviders; console.log(`Currently using ${providers.length} provider(s)`); // Add another provider qified.messageProviders = [ new MemoryMessageProvider(), new NatsMessageProvider() ]; // Replace all providers qified.messageProviders = [ new RedisMessageProvider({ uri: 'redis://localhost:6379' }) ]; // Access provider properties qified.messageProviders.forEach(provider => { console.log('Provider ID:', provider.id); }); ``` **Important Notes:** - Setting this property does **not** automatically disconnect existing providers - You should call `disconnect()` on old providers before replacing them to clean up resources - All message operations (`subscribe`, `publish`, `unsubscribeMessage`) will execute across all message providers in this array ### `taskProviders: TaskProvider[]` Get or set the array of task providers. Works the same way as `messageProviders` — getter returns the active providers, setter replaces them. **Type:** `TaskProvider[]` **Access:** Read/Write **Example:** ```typescript import { Qified, MemoryTaskProvider } from 'qified'; import { RedisTaskProvider } from '@qified/redis'; const qified = new Qified({ taskProviders: new MemoryTaskProvider() }); // Replace with a Redis-backed task provider qified.taskProviders = [ new RedisTaskProvider({ uri: 'redis://localhost:6379' }) ]; ``` All task operations (`enqueue`, `dequeue`, `unsubscribeTask`) execute across every task provider in this array. # Methods ## subscribe Subscribe to a topic to receive messages. If multiple message providers are configured, this will subscribe on all of them. **Parameters:** - `topic: string` - The topic to subscribe to - `handler: TopicHandler` - Object containing an optional `id` and a `handler` function **Example:** ```js await qified.subscribe('user-events', { id: 'userEventHandler', handler: async (message) => { console.log('User event:', message.data); } }); ``` ## publish Publish a message to a topic. If multiple message providers are configured, this will publish to all of them. **Parameters:** - `topic: string` - The topic to publish to - `message: Message` - The message object to publish **Example:** ```js await qified.publish('user-events', { id: 'evt-123', data: { userId: 'user-456', action: 'login', timestamp: Date.now() }, headers: { 'content-type': 'application/json' } }); ``` ## unsubscribeMessage Unsubscribe a message handler from a topic. If an `id` is provided, only that handler is unsubscribed. Otherwise, all handlers for the topic are unsubscribed. **Parameters:** - `topic: string` - The topic to unsubscribe from - `id?: string` - Optional handler ID. If not provided, all handlers are unsubscribed **Example:** ```js // Unsubscribe a specific handler await qified.unsubscribeMessage('user-events', 'userEventHandler'); // Unsubscribe all handlers for a topic await qified.unsubscribeMessage('user-events'); ``` ## enqueue Enqueue a task to a queue. If multiple task providers are configured, this will enqueue on all of them and return the id assigned by each provider (in provider order). **Parameters:** - `queue: string` - The queue to enqueue to - `task: EnqueueTask` - The task payload. `id` and `timestamp` are assigned by the provider **Returns:** `Promise` - The task ids from each provider **Example:** ```js const ids = await qified.enqueue('image-processing', { data: { imageUrl: 'https://example.com/img.png' }, headers: { 'x-source': 'uploader' }, maxRetries: 3, timeout: 30_000 }); console.log('Enqueued as', ids); ``` ## dequeue Register a handler to process tasks from a queue. If multiple task providers are configured, this registers the handler on all of them. The handler receives the task and a `TaskContext` with `ack()`, `reject()`, and `extend()` methods. **Parameters:** - `queue: string` - The queue to dequeue from - `handler: TaskHandler` - Object containing an optional `id` and a `handler(task, context)` function **Example:** ```js await qified.dequeue('image-processing', { id: 'resizer', handler: async (task, context) => { try { await processImage(task.data.imageUrl); await context.ack(); } catch (error) { // true = requeue for retry; false = send to dead-letter queue await context.reject(true); } } }); ``` ## unsubscribeTask Unsubscribe a task handler from a queue. If an `id` is provided, only that handler is unsubscribed. Otherwise, all handlers for the queue are unsubscribed. **Parameters:** - `queue: string` - The queue to unsubscribe from - `id?: string` - Optional handler ID. If not provided, all handlers are unsubscribed **Example:** ```js // Unsubscribe a specific handler await qified.unsubscribeTask('image-processing', 'resizer'); // Unsubscribe all handlers for a queue await qified.unsubscribeTask('image-processing'); ``` ## disconnect Disconnect from all providers and clean up resources. **Example:** ```js await qified.disconnect(); ``` # Events Qified extends [Hookified](https://hookified.org) and emits events for all major operations. You can listen to these events to add custom logging, monitoring, or error handling. # Available Events The following events are available via the `QifiedEvents` enum: - `QifiedEvents.publish` - Emitted after a message is successfully published - `QifiedEvents.subscribe` - Emitted after successfully subscribing to a topic - `QifiedEvents.unsubscribeMessage` - Emitted after successfully unsubscribing a message handler from a topic - `QifiedEvents.enqueue` - Emitted after a task is successfully enqueued - `QifiedEvents.dequeue` - Emitted after successfully registering a task handler on a queue - `QifiedEvents.unsubscribeTask` - Emitted after successfully unsubscribing a task handler from a queue - `QifiedEvents.disconnect` - Emitted after successfully disconnecting from all providers - `QifiedEvents.error` - Emitted when an error occurs during any operation - `QifiedEvents.info` - Emitted for informational messages - `QifiedEvents.warn` - Emitted for warning messages # Listening to Events Use the `on()` method to listen to events: ```js import { Qified, MemoryMessageProvider, QifiedEvents } from 'qified'; const qified = new Qified({ messageProviders: new MemoryMessageProvider() }); // Listen for publish events await qified.on(QifiedEvents.publish, async (data) => { console.log('Message published to topic:', data.topic); console.log('Message:', data.message); }); // Listen for subscribe events await qified.on(QifiedEvents.subscribe, async (data) => { console.log('Subscribed to topic:', data.topic); console.log('Handler ID:', data.handler.id); }); // Listen for unsubscribeMessage events await qified.on(QifiedEvents.unsubscribeMessage, async (data) => { console.log('Unsubscribed from topic:', data.topic); if (data.id) { console.log('Handler ID:', data.id); } }); // Listen for enqueue events await qified.on(QifiedEvents.enqueue, async (data) => { console.log('Task enqueued to queue:', data.queue); console.log('Assigned ids:', data.ids); }); // Listen for dequeue events await qified.on(QifiedEvents.dequeue, async (data) => { console.log('Handler registered on queue:', data.queue); console.log('Handler ID:', data.handler.id); }); // Listen for unsubscribeTask events await qified.on(QifiedEvents.unsubscribeTask, async (data) => { console.log('Unsubscribed from queue:', data.queue); if (data.id) { console.log('Handler ID:', data.id); } }); // Listen for disconnect events await qified.on(QifiedEvents.disconnect, async () => { console.log('Disconnected from all providers'); }); // Listen for errors await qified.on(QifiedEvents.error, async (error) => { console.error('Error occurred:', error); }); // Now perform operations await qified.subscribe('events', { id: 'handler1', handler: async (message) => { console.log('Received:', message.data); } }); await qified.publish('events', { id: 'msg-1', data: { text: 'Hello!' } }); await qified.unsubscribeMessage('events', 'handler1'); await qified.disconnect(); ``` ### Error Handling with Events Events provide a centralized way to handle errors across all operations: ```js import { Qified, QifiedEvents } from 'qified'; import { NatsMessageProvider } from '@qified/nats'; const qified = new Qified({ messageProviders: new NatsMessageProvider() }); // Centralized error handler await qified.on(QifiedEvents.error, async (error) => { console.error('Qified error:', error.message); // Send to error tracking service // Log to file // Send alert }); // Errors from publish, subscribe, etc. will be caught and emitted await qified.publish('topic', { id: '1', data: { test: true } }); ``` # Hooks Qified provides before and after hooks for all major operations, allowing you to intercept and modify data before an operation executes, or perform actions after it completes. Hooks are powered by [Hookified](https://hookified.org). ## Available Hooks The following hooks are available via the `QifiedHooks` enum: | Hook | Description | Context Properties | |------|-------------|-------------------| | `beforeSubscribe` | Called before subscribing to a topic | `{ topic, handler }` | | `afterSubscribe` | Called after subscribing to a topic | `{ topic, handler }` | | `beforePublish` | Called before publishing a message | `{ topic, message }` | | `afterPublish` | Called after publishing a message | `{ topic, message }` | | `beforeUnsubscribeMessage` | Called before unsubscribing a message handler | `{ topic, id }` | | `afterUnsubscribeMessage` | Called after unsubscribing a message handler | `{ topic, id }` | | `beforeEnqueue` | Called before enqueueing a task | `{ queue, task }` | | `afterEnqueue` | Called after enqueueing a task | `{ queue, task, ids }` | | `beforeDequeue` | Called before registering a task handler | `{ queue, handler }` | | `afterDequeue` | Called after registering a task handler | `{ queue, handler }` | | `beforeUnsubscribeTask` | Called before unsubscribing a task handler | `{ queue, id }` | | `afterUnsubscribeTask` | Called after unsubscribing a task handler | `{ queue, id }` | | `beforeDisconnect` | Called before disconnecting from providers | `{ messageProviderCount, taskProviderCount }` | | `afterDisconnect` | Called after disconnecting from providers | `{ messageProviderCount, taskProviderCount }` | ## Using Hooks Use the `onHook()` method to register a hook handler. Hooks use the `IHook` object format from [Hookified](https://hookified.org): ```js import { Qified, MemoryMessageProvider, QifiedHooks } from 'qified'; const qified = new Qified({ messageProviders: new MemoryMessageProvider() }); // Register a before hook using IHook object qified.onHook({ event: QifiedHooks.beforePublish, handler: async (context) => { console.log('About to publish to:', context.topic); } }); // Register an after hook with an id for later removal qified.onHook({ id: 'publish-logger', event: QifiedHooks.afterPublish, handler: async (context) => { console.log('Published message:', context.message.id); } }); // Register with options to control position qified.onHook({ event: QifiedHooks.beforePublish, handler: async (context) => { console.log('This runs first'); } }, { position: 'Top' }); ``` ## Modifying Data with Before Hooks Before hooks receive a mutable context object. Any changes you make to the context will be applied to the operation: ```js import { Qified, MemoryMessageProvider, QifiedHooks } from 'qified'; const qified = new Qified({ messageProviders: new MemoryMessageProvider() }); // Add timestamp and headers to all messages qified.onHook({ event: QifiedHooks.beforePublish, handler: async (context) => { // Add timestamp if not present context.message.timestamp = context.message.timestamp ?? Date.now(); // Add custom headers context.message.headers = { ...context.message.headers, 'x-processed-by': 'qified', 'x-environment': process.env.NODE_ENV }; } }); // Modify message data qified.onHook({ event: QifiedHooks.beforePublish, handler: async (context) => { // Add metadata to the message data context.message.data = { ...context.message.data, _meta: { version: '1.0', source: 'api' } }; } }); // Subscribe to receive messages await qified.subscribe('events', { id: 'handler1', handler: async (message) => { // Message will have timestamp, headers, and modified data console.log('Timestamp:', message.timestamp); console.log('Headers:', message.headers); console.log('Data:', message.data); } }); // Publish a message - hooks will modify it before sending await qified.publish('events', { id: 'msg-1', data: { text: 'Hello!' } }); ``` ## Modifying Topics with Before Hooks You can also modify the topic in before hooks: ```js // Route all messages to a prefixed topic qified.onHook({ event: QifiedHooks.beforePublish, handler: async (context) => { context.topic = `production/${context.topic}`; } }); // Subscribe to the prefixed topic await qified.subscribe('production/events', { id: 'handler1', handler: async (message) => { console.log('Received:', message.data); } }); // This publishes to 'production/events' due to the hook await qified.publish('events', { id: 'msg-1', data: { text: 'Hello!' } }); ``` ## Multiple Hooks Multiple hooks for the same event execute in the order they were registered: ```js // First hook - runs first (default position is 'Bottom') qified.onHook({ event: QifiedHooks.beforePublish, handler: async (context) => { context.message.timestamp = Date.now(); } }); // Second hook - runs second, can see changes from first hook qified.onHook({ event: QifiedHooks.beforePublish, handler: async (context) => { context.message.headers = { 'x-timestamp': String(context.message.timestamp) }; } }); // Third hook - runs third qified.onHook({ event: QifiedHooks.beforePublish, handler: async (context) => { console.log('Final message:', context.message); } }); // Use position option to insert at the top qified.onHook({ event: QifiedHooks.beforePublish, handler: async (context) => { console.log('This runs before all other hooks'); } }, { position: 'Top' }); ``` ## Hooks vs Events Both hooks and events are available, but they serve different purposes: | Feature | Hooks | Events | |---------|-------|--------| | Timing | Before and after operations | After operations only | | Data modification | Yes (before hooks) | No | | Use case | Intercepting/transforming data | Logging, monitoring, side effects | ```js // Hook - can modify the message before it's published qified.onHook({ event: QifiedHooks.beforePublish, handler: async (context) => { context.message.timestamp = Date.now(); } }); // Event - notified after publish completes (cannot modify) qified.on(QifiedEvents.publish, async (data) => { console.log('Published:', data.message.id); }); ``` # Providers There are multiple providers available to use: * Memory - this is built into the current `qified` library as `MemoryMessageProvider` and `MemoryTaskProvider`. * [@qified/redis](../redis/README.md) - Redis Provider (messages and tasks) * [@qified/rabbitmq](../rabbitmq/README.md) - RabbitMQ Provider (messages and tasks) * [@qified/nats](../nats/README.md) - NATS Provider (messages and tasks) * [@qified/zeromq](../zeromq/README.md) - ZeroMQ Provider (messages only) # Development and Testing Qified is written in TypeScript and tests are written in `vitest`. To run the tests, use the following command: 1. `pnpm install` - This will install all the dependencies 2. `pnpm test:services:start` - This will start the services needed for testing (Redis, RabbitMQ, etc) 3. `pnpm test` - This will run the tests To contribute follow the [Contributing Guidelines](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md). # License [MIT & © Jared Wray](LICENSE) ### @qified/nats URL: https://qified.org/docs/nats/ # @qified/nats NATS message provider for [Qified](https://github.com/jaredwray/qified). This package implements a message provider backed by NATS using the `publish`/`subscribe` operations. A special thanks to [Santosh Bandichode](mailto:santoshg550@gmail.com) for creating this package! ## Table of Contents - [Installation](#installation) - [Usage with Qified](#usage-with-qified) - [API](#api) - [NatsMessageProviderOptions](#natsmessageprovideroptions) - [defaultNatsUri](#defaultnatsuri) - [NatsMessageProvider](#natsmessageprovider) - [constructor](#constructor) - [publish](#publish) - [subscribe](#subscribe) - [unsubscribe](#unsubscribe) - [disconnect](#disconnect) - [createQified](#createqified) - [Contributing](#contributing) - [License](#license) ## Installation ```bash pnpm add @qified/nats ``` ## Usage with Qified ```ts import { createQified } from "@qified/nats"; import type { Message } from "qified"; const qified = createQified({ uri: "localhost:4222" }); await qified.subscribe("example-topic", { async handler(message: Message) { console.log(message); }, }); await qified.publish("example-topic", { id: "1", data: "Hello from NATS!" }); await qified.disconnect(); ``` ## API ### NatsMessageProviderOptions Configuration options for the NATS message provider. - `uri?`: NATS connection URI. Defaults to [`defaultNatsUri`](#defaultnatsuri). ### defaultNatsUri Default NATS connection string (`"localhost:4222"`). ### NatsMessageProvider Implements the `MessageProvider` interface using NATS publish/subscribe. #### constructor(options?: NatsMessageProviderOptions) Creates a new provider. Options: - `uri`: NATS connection URI (defaults to `"localhost:4222"`). #### publish(topic: string, message: Message) Publishes a message to a topic. #### subscribe(topic: string, handler: TopicHandler) Subscribes a handler to a topic. #### unsubscribe(topic: string, id?: string) Unsubscribes a handler by id or all handlers for a topic. #### disconnect() Disconnects from the NATS server and clears all subscriptions. ### createQified(options?: NatsMessageProviderOptions) Convenience factory that returns a `Qified` instance configured with `NatsMessageProvider`. ## Draining Messages NATS allows processing in-flight messages before unsubscribing/disconnecting. If this is needed, override unsubscribe and/or disconnect methods and call drain instead of unsubscribe/close. ```typescript public async unsubscribe(topic: string, id?: string): Promise { // ... await this._subscriptions.get(topic)?.drain(); // ... } ``` ```typescript public async disconnect(): Promise { // ... await this._connection?.drain(); // ... } ``` Please read [NATS Pub/Sub](https://github.com/nats-io/nats.js/blob/main/core/README.md) to know about message draining. ## Contributing Contributions are welcome! Please read the [CONTRIBUTING.md](../../CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](../../CODE_OF_CONDUCT.md) for details on our process. ## License MIT © Jared Wray. See [LICENSE](../../LICENSE) for details. ### @qified/rabbitmq URL: https://qified.org/docs/rabbitmq/ # @qified/rabbitmq RabbitMQ message and task provider for [Qified](https://github.com/jaredwray/qified). This package implements a message provider and a task provider backed by RabbitMQ. The message provider uses queues for publish/subscribe operations, and the task provider adds reliable task queue processing with retries, timeouts, and dead-letter queues. ## Table of Contents - [Installation](#installation) - [Usage with Qified](#usage-with-qified) - [Message Provider](#message-provider) - [Task Provider](#task-provider) - [API](#api) - [RabbitMqMessageProviderOptions](#rabbitmqmessageprovideroptions) - [defaultRabbitMqUri](#defaultrabbitmquri) - [RabbitMqMessageProvider](#rabbitmqmessageprovider) - [constructor](#constructor) - [publish](#publish) - [subscribe](#subscribe) - [unsubscribe](#unsubscribe) - [disconnect](#disconnect) - [createQified](#createqified) - [RabbitMqTaskProviderOptions](#rabbitmqtaskprovideroptions) - [RabbitMqTaskProvider](#rabbitmqtaskprovider) - [constructor](#constructor-1) - [connect](#connect) - [enqueue](#enqueue) - [dequeue](#dequeue) - [unsubscribe](#unsubscribe-1) - [disconnect](#disconnect-1) - [getDeadLetterTasks](#getdeadlettertasks) - [getQueueStats](#getqueuestats) - [clearQueue](#clearqueue) - [Contributing](#contributing) - [License](#license) ## Installation ```bash pnpm add @qified/rabbitmq ``` ## Usage with Qified ### Message Provider ```ts import { createQified } from "@qified/rabbitmq"; import type { Message } from "qified"; const qified = createQified({ uri: "amqp://localhost:5672" }); await qified.subscribe("example-topic", { async handler(message: Message) { console.log(message); }, }); await qified.publish("example-topic", { id: "1", data: "Hello from RabbitMQ!" }); await qified.disconnect(); ``` ### Task Provider ```ts import { RabbitMqTaskProvider } from "@qified/rabbitmq"; const taskProvider = new RabbitMqTaskProvider({ uri: "amqp://localhost:5672" }); // Enqueue a task await taskProvider.enqueue("my-queue", { data: { action: "send-email", to: "user@example.com" }, }); // Dequeue and process tasks await taskProvider.dequeue("my-queue", { id: "email-handler", handler: async (task, ctx) => { console.log("Processing task:", task.data); // Access attempt metadata console.log(`Attempt ${ctx.metadata.attempt} of ${ctx.metadata.maxRetries}`); // Extend the deadline if needed await ctx.extend(10_000); // Acknowledge the task on success await ctx.ack(); }, }); // Get queue statistics const stats = await taskProvider.getQueueStats("my-queue"); console.log(stats); // { waiting, processing, deadLetter } // Get dead-letter tasks for inspection const deadLetters = await taskProvider.getDeadLetterTasks("my-queue"); // Clean up await taskProvider.disconnect(); ``` ## API ### RabbitMqMessageProviderOptions Configuration options for the RabbitMQ message provider. - `uri?`: RabbitMQ connection URI. Defaults to [`defaultRabbitMqUri`](#defaultrabbitmquri). ### defaultRabbitMqUri Default RabbitMQ connection string (`"amqp://localhost:5672"`). ### RabbitMqMessageProvider Implements the `MessageProvider` interface using RabbitMQ queues. #### constructor(options?: RabbitMqMessageProviderOptions) Creates a new provider. Options: - `uri`: RabbitMQ connection URI (defaults to `"amqp://localhost:5672"`). #### publish(topic: string, message: Message) Publishes a message to a topic. #### subscribe(topic: string, handler: TopicHandler) Subscribes a handler to a topic. #### unsubscribe(topic: string, id?: string) Unsubscribes a handler by id or all handlers for a topic. #### disconnect() Cancels all subscriptions and closes the underlying RabbitMQ connection. ### createQified(options?: RabbitMqMessageProviderOptions) Convenience factory that returns a `Qified` instance configured with `RabbitMqMessageProvider`. ### RabbitMqTaskProviderOptions Configuration options for the RabbitMQ task provider. Extends `TaskProviderOptions`. - `uri?`: RabbitMQ connection URI. Defaults to `"amqp://localhost:5672"`. - `id?`: Unique identifier for this provider instance. Defaults to `"@qified/rabbitmq-task"`. - `timeout?`: Default timeout in milliseconds for task processing. Defaults to `30000`. - `retries?`: Default maximum retry attempts before a task is moved to the dead-letter queue. Defaults to `3`. - `reconnectTimeInSeconds?`: Time in seconds to wait before reconnecting after connection loss. Set to `0` to disable. Defaults to `5`. ### RabbitMqTaskProvider Implements the `TaskProvider` interface using RabbitMQ durable queues for reliable task processing. Extends `Hookified` for event emission. Features include: - Automatic retries with configurable max attempts - Task timeouts with automatic rejection on expiry - Dead-letter queue for failed tasks - Automatic reconnection on connection loss #### constructor(options?: RabbitMqTaskProviderOptions) Creates a new task provider instance. #### connect() Explicitly connects to RabbitMQ. Called automatically on first `enqueue` or `dequeue` if not called manually. #### enqueue(queue: string, taskData: EnqueueTask) Enqueues a task to the specified queue. Returns a `Promise` with the generated task ID. Task data options: - `data`: The task payload (any serializable value). - `id?`: Custom task ID. Auto-generated if omitted. - `timeout?`: Per-task timeout override in milliseconds. - `maxRetries?`: Per-task max retry override. #### dequeue(queue: string, handler: TaskHandler) Registers a handler to process tasks from the specified queue. The handler receives a `Task` and a `TaskContext`. `TaskContext` methods: - `ack()`: Acknowledge the task (removes it from the queue). - `reject(requeue?: boolean)`: Reject the task. If `requeue` is `true` (default), re-enqueues for retry. After max retries, moves to dead-letter queue. - `extend(ms: number)`: Extend the processing deadline by the given milliseconds. - `metadata`: Object with `{ attempt, maxRetries }` for the current task. #### unsubscribe(queue: string, id?: string) Removes a handler by id, or all handlers for the queue if no id is provided. #### disconnect(force?: boolean) Disconnects from RabbitMQ and cleans up all consumers, timers, and in-memory state. If `force` is `true`, skips graceful channel close. #### getDeadLetterTasks(queue: string) Returns an array of tasks that have been moved to the dead-letter queue for the given queue. #### getQueueStats(queue: string) Returns statistics for the given queue: ```ts { waiting: number; processing: number; deadLetter: number } ``` #### clearQueue(queue: string) Purges all tasks from the queue and its dead-letter queue, and clears all in-memory tracking state. ## Contributing Contributions are welcome! Please read the [CONTRIBUTING.md](../../CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](../../CODE_OF_CONDUCT.md) for details on our process. ## License MIT © Jared Wray. See [LICENSE](../../LICENSE) for details. ### @qified/redis URL: https://qified.org/docs/redis/ # @qified/redis Redis message provider for [Qified](https://github.com/jaredwray/qified). This package implements a message provider backed by Redis using the Redis `publish`/`subscribe` commands. ## Table of Contents - [Installation](#installation) - [Usage with Qified](#usage-with-qified) - [API](#api) - [RedisMessageProviderOptions](#redismessageprovideroptions) - [defaultRedisUri](#defaultredisuri) - [RedisMessageProvider](#redismessageprovider) - [constructor](#constructor) - [publish](#publish) - [subscribe](#subscribe) - [unsubscribe](#unsubscribe) - [disconnect](#disconnect) - [createQified](#createqified) - [Contributing](#contributing) - [License](#license) ## Installation ```bash pnpm add @qified/redis ``` ## Usage with Qified ```ts import { createQified } from "@qified/redis"; import type { Message } from "qified"; const qified = createQified({ uri: "redis://localhost:6379" }); await qified.subscribe("example-topic", { async handler(message: Message) { console.log(message); }, }); await qified.publish("example-topic", { id: "1", data: "Hello from Redis!" }); await qified.disconnect(); ``` ## API ### RedisMessageProviderOptions Configuration options for the Redis message provider. - `uri?`: Redis connection URI. Defaults to [`defaultRedisUri`](#defaultredisuri). ### defaultRedisUri Default Redis connection string (`"redis://localhost:6379"`). ### RedisMessageProvider Implements the `MessageProvider` interface using Redis pub/sub. #### constructor(options?: RedisMessageProviderOptions) Creates a new provider. Options: - `uri`: Redis connection URI (defaults to `"redis://localhost:6379"`). #### publish(topic: string, message: Message) Publishes a message to a topic. #### subscribe(topic: string, handler: TopicHandler) Subscribes a handler to a topic. #### unsubscribe(topic: string, id?: string) Unsubscribes a handler by id or all handlers for a topic. #### disconnect() Disconnects the underlying Redis clients and clears all subscriptions. ### createQified(options?: RedisMessageProviderOptions) Convenience factory that returns a `Qified` instance configured with `RedisMessageProvider`. ## Contributing Contributions are welcome! Please read the [CONTRIBUTING.md](../../CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](../../CODE_OF_CONDUCT.md) for details on our process. ## License MIT © Jared Wray. See [LICENSE](../../LICENSE) for details. ### @qified/zeromq URL: https://qified.org/docs/zeromq/ # @qified/zeromq ZeroMQ message provider for [Qified](https://github.com/jaredwray/qified). This package implements a message provider backed by ZeroMQ using queues for publish and subscribe operations. > **Messages only:** `@qified/zeromq` does not provide a task queue implementation — ZeroMQ's pub/sub pattern does not support the ack / retry / dead-letter semantics Qified tasks rely on. For task queues use [`@qified/redis`](../redis/README.md), [`@qified/rabbitmq`](../rabbitmq/README.md), or [`@qified/nats`](../nats/README.md). ## Table of Contents - [Installation](#installation) - [Usage with Qified](#usage-with-qified) - [API](#api) - [ZmqMessageProviderOptions](#zmqmessageprovideroptions) - [defaultZmqUri](#defaultzmquri) - [ZmqMessageProvider](#zmqmessageprovider) - [constructor](#constructor) - [publish](#publish) - [subscribe](#subscribe) - [unsubscribe](#unsubscribe) - [disconnect](#disconnect) - [createQified](#createqified) - [Contributing](#contributing) - [License](#license) ## Installation ```bash pnpm add @qified/zeromq ``` ## Usage with Qified ```ts import { createQified } from "@qified/zeromq"; import type { Message } from "qified"; const qified = createQified({ uri: "tcp://localhost:5555" }); await qified.subscribe("example-topic", { async handler(message: Message) { console.log(message); }, }); await qified.publish("example-topic", { id: "1", data: "Hello from ZeroMQ!" }); await qified.disconnect(); ``` ## API ### ZmqMessageProviderOptions Configuration options for the ZeroMQ message provider. - `uri?`: ZeroMQ connection URI. Defaults to [`defaultZmqUri`](#defaultzmquri). ### defaultZmqUri Default ZeroMQ connection string (`"tcp://localhost:5555"`). ### ZmqMessageProvider Implements the `MessageProvider` interface using ZeroMQ queues. #### constructor(options?: ZmqMessageProviderOptions) Creates a new provider. Options: - `uri`: ZeroMQ connection URI (defaults to `"tcp://localhost:5555"`). #### publish(topic: string, message: Message) Publishes a message to a topic. #### subscribe(topic: string, handler: TopicHandler) Subscribes a handler to a topic. #### unsubscribe(topic: string, id?: string) Unsubscribes a handler by id or all handlers for a topic. #### disconnect() Cancels all subscriptions and closes the underlying ZeroMQ Publisher/Subscriber. ### createQified(options?: ZmqMessageProviderOptions) Convenience factory that returns a `Qified` instance configured with `ZmqMessageProvider`. ## Contributing Contributions are welcome! Please read the [CONTRIBUTING.md](../../CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](../../CODE_OF_CONDUCT.md) for details on our process. ## License MIT © Jared Wray. See [LICENSE](../../LICENSE) for details. ## API Reference URL: https://qified.org/api - Not available. ## Changelog URL: https://qified.org/changelog ### v0.11.0 URL: https://qified.org/changelog/v0-11-0 Date: May 18, 2026 Tag: Release ## v0.11.0 — 2026-05-18 Dependency-management release: drops the deprecated `nats` package, bumps `amqplib` to v2, and refreshes dev tooling. ### ⚠ BREAKING CHANGES - bump `amqplib` runtime dep from `1.x` to `2.0.1` in `@qified/rabbitmq` (8af4e55, #195) Migration: the only documented v2 break is `heartbeat: 0` now disables heartbeats (previously "no preference"). `@qified/rabbitmq` does not expose a heartbeat option, so consumers do not need to change anything. - remove deprecated `nats@2.x` dependency from `@qified/nats` (4e5c8e1, #196) Migration: `@qified/nats` no longer transitively provides the legacy `nats` package. The modern `@nats-io/jetstream` and `@nats-io/transport-node` clients are still shipped. Consumers that import the legacy `nats` package directly should add it to their own `dependencies`. ### Internal - upgrade to pnpm 11 via corepack and bump test matrix to Node 22/24/26 (bca34c3, #192) - override `@ungap/structured-clone` to `>=1.3.1` (CWE-502) (7526167, #192) - upgrade `tsdown` to `0.22.0` (ef91092, #193) - align root `engines.node` with `tsdown` 0.22.0 floor (`^22.18.0 || >=24.0.0`) (06ae52a, #193) - upgrade GitHub Actions to latest majors — checkout v6, setup-node v6, wrangler-action v4, codecov-action v6, codeql-action v4 (bce0018, #194) - drop redundant `@types/amqplib` devDep — amqplib v2 ships its own types (b691337, #195) ### Contributors - @jaredwray **Full diff:** [https://github.com/jaredwray/qified/compare/v0.10.1...v0.11.0](https://github.com/jaredwray/qified/compare/v0.10.1...v0.11.0) ### v0.10.1 URL: https://qified.org/changelog/v0-10-1 Date: April 24, 2026 Tag: Release ## What's Changed * rabbitmq - fix: concurrency fixes by @jaredwray in [https://github.com/jaredwray/qified/pull/191](https://github.com/jaredwray/qified/pull/191) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.10.0...v0.10.1](https://github.com/jaredwray/qified/compare/v0.10.0...v0.10.1) ### v0.10.0 URL: https://qified.org/changelog/v0-10-0 Date: April 24, 2026 Tag: Release ## What's Changed * feat: Add NatsTaskProvider for NATS JetStream task queue support by @jaredwray in [https://github.com/jaredwray/qified/pull/181](https://github.com/jaredwray/qified/pull/181) * mono - chore: upgrading biome, types, and vitest by @jaredwray in [https://github.com/jaredwray/qified/pull/182](https://github.com/jaredwray/qified/pull/182) * mono - chore: upgrading typescript, tsdown, and docula by @jaredwray in [https://github.com/jaredwray/qified/pull/183](https://github.com/jaredwray/qified/pull/183) * rabbitmq - chore: upgrading amqplib to 1.0.3 by @jaredwray in [https://github.com/jaredwray/qified/pull/184](https://github.com/jaredwray/qified/pull/184) * rabbitmq - chore: adding in test coverage by @jaredwray in [https://github.com/jaredwray/qified/pull/185](https://github.com/jaredwray/qified/pull/185) * rabbitmq - chore: test cleanup by @jaredwray in [https://github.com/jaredwray/qified/pull/186](https://github.com/jaredwray/qified/pull/186) * chore: upgrading redis to 5.12.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/187](https://github.com/jaredwray/qified/pull/187) * qified - feat: adding in enque and deqeue by @jaredwray in [https://github.com/jaredwray/qified/pull/188](https://github.com/jaredwray/qified/pull/188) * mono - fix: rabbit and nats with better connection handling by @jaredwray in [https://github.com/jaredwray/qified/pull/189](https://github.com/jaredwray/qified/pull/189) * mono - fix: providerId and reconnect / connection fixes by @jaredwray in [https://github.com/jaredwray/qified/pull/190](https://github.com/jaredwray/qified/pull/190) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.9.1...v0.10.0](https://github.com/jaredwray/qified/compare/v0.9.1...v0.10.0) ### v0.9.1 URL: https://qified.org/changelog/v0-9-1 Date: March 31, 2026 Tag: Release ## What's Changed * mono - chore: upgradinb vitest, biome, and types by @jaredwray in [https://github.com/jaredwray/qified/pull/174](https://github.com/jaredwray/qified/pull/174) * mono - chore: upgrading docula by @jaredwray in [https://github.com/jaredwray/qified/pull/175](https://github.com/jaredwray/qified/pull/175) * mono - chore: upgrading typescript by @jaredwray in [https://github.com/jaredwray/qified/pull/176](https://github.com/jaredwray/qified/pull/176) * qified - chore: upgrading hookified by @jaredwray in [https://github.com/jaredwray/qified/pull/177](https://github.com/jaredwray/qified/pull/177) * rabbitmq - chore: upgrading hookified by @jaredwray in [https://github.com/jaredwray/qified/pull/178](https://github.com/jaredwray/qified/pull/178) * rabbitmq - chore: upgrading amqplib by @jaredwray in [https://github.com/jaredwray/qified/pull/179](https://github.com/jaredwray/qified/pull/179) * redis - chore: upgrading hookified by @jaredwray in [https://github.com/jaredwray/qified/pull/180](https://github.com/jaredwray/qified/pull/180) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.9.0...v0.9.1](https://github.com/jaredwray/qified/compare/v0.9.0...v0.9.1) ### v0.9.0 URL: https://qified.org/changelog/v0-9-0 Date: March 8, 2026 Tag: Release ## What's Changed * mono - chore: upgrading biome, rimraf, and types to latest by @jaredwray in [https://github.com/jaredwray/qified/pull/169](https://github.com/jaredwray/qified/pull/169) * nats - chore: upgrading @nats-io/transport-node to 3.3.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/170](https://github.com/jaredwray/qified/pull/170) * qified - chore: upgrading hookified to 2.1.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/171](https://github.com/jaredwray/qified/pull/171) * redis - chore: upgrading redis to 5.11.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/172](https://github.com/jaredwray/qified/pull/172) * redis - chore: adding more test coverage by @jaredwray in [https://github.com/jaredwray/qified/pull/173](https://github.com/jaredwray/qified/pull/173) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.8.0...v0.9.0](https://github.com/jaredwray/qified/compare/v0.8.0...v0.9.0) ### v0.8.0 URL: https://qified.org/changelog/v0-8-0 Date: February 12, 2026 Tag: Release ## What's Changed * rabbitmq - feat: add migration amqplib to better connection management by @jaredwray in [https://github.com/jaredwray/qified/pull/158](https://github.com/jaredwray/qified/pull/158) * rabbitmq - chore: moving tests away from mock to use local instance by @jaredwray in [https://github.com/jaredwray/qified/pull/159](https://github.com/jaredwray/qified/pull/159) * mono - chore: migrating shared dependencies to root by @jaredwray in [https://github.com/jaredwray/qified/pull/160](https://github.com/jaredwray/qified/pull/160) * rabbitmq - fix: making tests more robust by @jaredwray in [https://github.com/jaredwray/qified/pull/161](https://github.com/jaredwray/qified/pull/161) * mono - chore: upgrading vitest to 4.0.18 by @jaredwray in [https://github.com/jaredwray/qified/pull/162](https://github.com/jaredwray/qified/pull/162) * mono - chore: upgrading @biomejs/biome to 2.3.14 by @jaredwray in [https://github.com/jaredwray/qified/pull/163](https://github.com/jaredwray/qified/pull/163) * mono - chore: upgrading docula to 0.40.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/164](https://github.com/jaredwray/qified/pull/164) * redis - fix: making tests more resilient to partial failure by @jaredwray in [https://github.com/jaredwray/qified/pull/165](https://github.com/jaredwray/qified/pull/165) * qified - chore: upgrading hookified to 1.15.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/166](https://github.com/jaredwray/qified/pull/166) * redis - chore: upgrading hookified to 1.15.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/167](https://github.com/jaredwray/qified/pull/167) * rabbitmq - feat: adding in tasks by @jaredwray in [https://github.com/jaredwray/qified/pull/168](https://github.com/jaredwray/qified/pull/168) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.7.0...v0.8.0](https://github.com/jaredwray/qified/compare/v0.7.0...v0.8.0) ### v0.7.0 URL: https://qified.org/changelog/v0-7-0 Date: January 21, 2026 Tag: Release ## What's Changed * feat: adding in agents file by @jaredwray in [https://github.com/jaredwray/qified/pull/148](https://github.com/jaredwray/qified/pull/148) * mono - feat: adding in nodejs 24 by @jaredwray in [https://github.com/jaredwray/qified/pull/149](https://github.com/jaredwray/qified/pull/149) * nats - chore: upgrading rimraf to 6.1.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/150](https://github.com/jaredwray/qified/pull/150) * qified - chore: upgrading rimraf to 6.1.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/151](https://github.com/jaredwray/qified/pull/151) * rabbitmq - chore: upgrading rimraf to 6.1.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/152](https://github.com/jaredwray/qified/pull/152) * redis - chore: upgrading redis to 5.10.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/153](https://github.com/jaredwray/qified/pull/153) * zeromq - chore: upgrading rimraf to 6.1.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/154](https://github.com/jaredwray/qified/pull/154) * mono - feat: adding in pnpm caching by @jaredwray in [https://github.com/jaredwray/qified/pull/155](https://github.com/jaredwray/qified/pull/155) * redis - feat: add task provider by @jaredwray in [https://github.com/jaredwray/qified/pull/156](https://github.com/jaredwray/qified/pull/156) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.6.0...v0.7.0](https://github.com/jaredwray/qified/compare/v0.6.0...v0.7.0) ### v0.6.0 URL: https://qified.org/changelog/v0-6-0 Date: December 28, 2025 Tag: Release ## What's Changed * chore: updating the minimum release age to 2 days by @jaredwray in [https://github.com/jaredwray/qified/pull/128](https://github.com/jaredwray/qified/pull/128) * mono - chore: upgrading docula to 0.31.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/129](https://github.com/jaredwray/qified/pull/129) * mono - chore: upgrading vitest to 4.0.16 by @jaredwray in [https://github.com/jaredwray/qified/pull/130](https://github.com/jaredwray/qified/pull/130) * mono - chore: upgrading @biomejs/biome to 2.3.10 by @jaredwray in [https://github.com/jaredwray/qified/pull/131](https://github.com/jaredwray/qified/pull/131) * nats - chore: upgrading vitest to 4.0.16 by @jaredwray in [https://github.com/jaredwray/qified/pull/132](https://github.com/jaredwray/qified/pull/132) * nats - chore: upgrading @biomejs/biome to 2.3.10 by @jaredwray in [https://github.com/jaredwray/qified/pull/133](https://github.com/jaredwray/qified/pull/133) * zeromq - fix: updating tests to be unique by @jaredwray in [https://github.com/jaredwray/qified/pull/134](https://github.com/jaredwray/qified/pull/134) * qified - chore: upgrading vitest to 4.0.16 by @jaredwray in [https://github.com/jaredwray/qified/pull/135](https://github.com/jaredwray/qified/pull/135) * qified - chore: upgrading @biomejs/biome to 2.3.10 by @jaredwray in [https://github.com/jaredwray/qified/pull/136](https://github.com/jaredwray/qified/pull/136) * qified - chore: upgrading hookified to 1.14.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/137](https://github.com/jaredwray/qified/pull/137) * rabbitmq - chore: upgrading vitest to 4.0.16 by @jaredwray in [https://github.com/jaredwray/qified/pull/138](https://github.com/jaredwray/qified/pull/138) * rabbitmq - chore: upgrading @biomejs/biome to 2.3.10 by @jaredwray in [https://github.com/jaredwray/qified/pull/139](https://github.com/jaredwray/qified/pull/139) * redis - chore: upgrading vitest to 4.0.16 by @jaredwray in [https://github.com/jaredwray/qified/pull/140](https://github.com/jaredwray/qified/pull/140) * redis - chore: upgrading @biomejs/biome to 2.3.10 by @jaredwray in [https://github.com/jaredwray/qified/pull/141](https://github.com/jaredwray/qified/pull/141) * zeromq - chore: upgrading vitest to 4.0.16 by @jaredwray in [https://github.com/jaredwray/qified/pull/142](https://github.com/jaredwray/qified/pull/142) * zeromq - chore: upgrading @biomejs/biome to 2.3.10 by @jaredwray in [https://github.com/jaredwray/qified/pull/143](https://github.com/jaredwray/qified/pull/143) * qified - feat: adding in hooks by @jaredwray in [https://github.com/jaredwray/qified/pull/144](https://github.com/jaredwray/qified/pull/144) * qified - feat: adding in hooks tests by @jaredwray in [https://github.com/jaredwray/qified/pull/145](https://github.com/jaredwray/qified/pull/145) * qified - feat: task providers now can be single or array in options by @jaredwray in [https://github.com/jaredwray/qified/pull/147](https://github.com/jaredwray/qified/pull/147) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.5.3...v0.6.0](https://github.com/jaredwray/qified/compare/v0.5.3...v0.6.0) ### v0.5.3 URL: https://qified.org/changelog/v0-5-3 Date: December 5, 2025 Tag: Release ## What's Changed * mono - chore: upgrading tsx to 4.21.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/121](https://github.com/jaredwray/qified/pull/121) * nats - chore: upgrading tsup to 8.5.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/122](https://github.com/jaredwray/qified/pull/122) * qified - chore: upgrading tsup to 8.5.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/123](https://github.com/jaredwray/qified/pull/123) * rabbitmq - chore: upgrading tsup to 8.5.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/124](https://github.com/jaredwray/qified/pull/124) * redis - chore: upgrading tsup to 8.5.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/125](https://github.com/jaredwray/qified/pull/125) * zeromq - chore: upgrading tsup to 8.5.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/126](https://github.com/jaredwray/qified/pull/126) * redis - feat: handling disconnect better by @jaredwray in [https://github.com/jaredwray/qified/pull/127](https://github.com/jaredwray/qified/pull/127) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.5.2...v0.5.3](https://github.com/jaredwray/qified/compare/v0.5.2...v0.5.3) ### v0.5.2 URL: https://qified.org/changelog/v0-5-2 Date: November 12, 2025 Tag: Release ## What's Changed * mono - chore: upgrading vitest to 4.0.8 by @jaredwray in [https://github.com/jaredwray/qified/pull/107](https://github.com/jaredwray/qified/pull/107) * qified - chore: upgrading vitest to 4.0.8 by @jaredwray in [https://github.com/jaredwray/qified/pull/108](https://github.com/jaredwray/qified/pull/108) * qified - chore: upgrading @biomejs/biome to 2.3.5 by @jaredwray in [https://github.com/jaredwray/qified/pull/109](https://github.com/jaredwray/qified/pull/109) * qified - chore: upgrading hookified to 1.13.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/110](https://github.com/jaredwray/qified/pull/110) * nats - chore: upgrading @biomejs/biome to 2.3.5 by @jaredwray in [https://github.com/jaredwray/qified/pull/111](https://github.com/jaredwray/qified/pull/111) * nats - chore: upgrading vitest to 4.0.8 by @jaredwray in [https://github.com/jaredwray/qified/pull/112](https://github.com/jaredwray/qified/pull/112) * rabbitmq - chore: upgrading @biomejs/biome to 2.2.6 by @jaredwray in [https://github.com/jaredwray/qified/pull/113](https://github.com/jaredwray/qified/pull/113) * rabbitmq - chore: upgrading vitest to 4.0.8 by @jaredwray in [https://github.com/jaredwray/qified/pull/114](https://github.com/jaredwray/qified/pull/114) * redis - chore: upgrading @biomejs/biome to 2.3.5 by @jaredwray in [https://github.com/jaredwray/qified/pull/115](https://github.com/jaredwray/qified/pull/115) * redis - chore: upgrading redis to 5.9.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/116](https://github.com/jaredwray/qified/pull/116) * redis - chore: upgrading vitest to 4.0.8 by @jaredwray in [https://github.com/jaredwray/qified/pull/117](https://github.com/jaredwray/qified/pull/117) * zeromq - chore: upgrading @biomejs/biome to 2.3.5 by @jaredwray in [https://github.com/jaredwray/qified/pull/118](https://github.com/jaredwray/qified/pull/118) * zeromq - chore: upgrading vitest to 4.0.8 by @jaredwray in [https://github.com/jaredwray/qified/pull/119](https://github.com/jaredwray/qified/pull/119) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.5.1...v0.5.2](https://github.com/jaredwray/qified/compare/v0.5.1...v0.5.2) ### v0.5.1 URL: https://qified.org/changelog/v0-5-1 Date: October 20, 2025 Tag: Release ## What's Changed * qified - chore: chore: removing minify as it causes debugging issues by @jaredwray in [https://github.com/jaredwray/qified/pull/96](https://github.com/jaredwray/qified/pull/96) * feat: MessageProvider in options instead of MessageProvider[] by @jaredwray in [https://github.com/jaredwray/qified/pull/97](https://github.com/jaredwray/qified/pull/97) * redis - addin in connection for lazy loading by @jaredwray in [https://github.com/jaredwray/qified/pull/98](https://github.com/jaredwray/qified/pull/98) * qified - feat: updating Task types to work better by @jaredwray in [https://github.com/jaredwray/qified/pull/99](https://github.com/jaredwray/qified/pull/99) * qified - feat: adding in-memory task provider by @jaredwray in [https://github.com/jaredwray/qified/pull/100](https://github.com/jaredwray/qified/pull/100) * mono - chore: upgrading docula to 0.31.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/101](https://github.com/jaredwray/qified/pull/101) * nats - chore: upgrading @biomejs/biome to 2.2.6 by @jaredwray in [https://github.com/jaredwray/qified/pull/102](https://github.com/jaredwray/qified/pull/102) * qified - chore: upgrading hookified to 1.12.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/103](https://github.com/jaredwray/qified/pull/103) * rabbitmq - chore: upgrading @biomejs/biome to 2.2.6 by @jaredwray in [https://github.com/jaredwray/qified/pull/104](https://github.com/jaredwray/qified/pull/104) * redis - chore: upgrading @biomejs/biome to 2.2.6 by @jaredwray in [https://github.com/jaredwray/qified/pull/105](https://github.com/jaredwray/qified/pull/105) * zeromq - chore: upgrading @biomejs/biome to 2.2.6 by @jaredwray in [https://github.com/jaredwray/qified/pull/106](https://github.com/jaredwray/qified/pull/106) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.5.0...v0.5.1](https://github.com/jaredwray/qified/compare/v0.5.0...v0.5.1) ### v0.5.0 URL: https://qified.org/changelog/v0-5-0 Date: October 4, 2025 Tag: Release ## What's Changed * zeromq - feat: added ZeroMQ provider by @techntools in [https://github.com/jaredwray/qified/pull/84](https://github.com/jaredwray/qified/pull/84) * zeromq - feat: moving default port to 5555 by @jaredwray in [https://github.com/jaredwray/qified/pull/87](https://github.com/jaredwray/qified/pull/87) * qified - feat: updating readme with examples by @jaredwray in [https://github.com/jaredwray/qified/pull/88](https://github.com/jaredwray/qified/pull/88) * qified - feat: adding in id to each provider by @jaredwray in [https://github.com/jaredwray/qified/pull/89](https://github.com/jaredwray/qified/pull/89) * qified - feat: adding in emits for error, message, etc by @jaredwray in [https://github.com/jaredwray/qified/pull/91](https://github.com/jaredwray/qified/pull/91) * nats - fix: do not drain in-flight messages by @techntools in [https://github.com/jaredwray/qified/pull/85](https://github.com/jaredwray/qified/pull/85) * redis - chore: upgrading redis to 5.8.3 by @jaredwray in [https://github.com/jaredwray/qified/pull/95](https://github.com/jaredwray/qified/pull/95) * mono - feat: adding minify to all builds by @jaredwray in [https://github.com/jaredwray/qified/pull/92](https://github.com/jaredwray/qified/pull/92) * mono - chore: upgrading docula to 0.30.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/93](https://github.com/jaredwray/qified/pull/93) * mono - feat: adding in multi doc site by @jaredwray in [https://github.com/jaredwray/qified/pull/94](https://github.com/jaredwray/qified/pull/94) * mono - fix: making it so we build qified first by @jaredwray in [https://github.com/jaredwray/qified/pull/90](https://github.com/jaredwray/qified/pull/90) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.4.3...v0.5.0](https://github.com/jaredwray/qified/compare/v0.4.3...v0.5.0) ### v0.4.3 URL: https://qified.org/changelog/v0-4-3 Date: September 26, 2025 Tag: Release ## What's Changed * qified - chore: upgrading biome to 2.2.4 by @jaredwray in [https://github.com/jaredwray/qified/pull/79](https://github.com/jaredwray/qified/pull/79) * nats - chore: upgrading biome to 2.2.4 by @jaredwray in [https://github.com/jaredwray/qified/pull/80](https://github.com/jaredwray/qified/pull/80) * nats - chore: upgrading @nats-io/transport-node to 3.2.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/81](https://github.com/jaredwray/qified/pull/81) * rabbitmq - chore: upgrading biome to 2.2.4 by @jaredwray in [https://github.com/jaredwray/qified/pull/82](https://github.com/jaredwray/qified/pull/82) * redis - chore: upgrading biome to 2.2.4 by @jaredwray in [https://github.com/jaredwray/qified/pull/83](https://github.com/jaredwray/qified/pull/83) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.4.2...v0.4.3](https://github.com/jaredwray/qified/compare/v0.4.2...v0.4.3) ### v0.4.2 URL: https://qified.org/changelog/v0-4-2 Date: September 3, 2025 Tag: Release ## What's Changed * mono - updating tsx and docula to latest by @jaredwray in [https://github.com/jaredwray/qified/pull/72](https://github.com/jaredwray/qified/pull/72) * mono - fix: moving to error on warnings with biome by @jaredwray in [https://github.com/jaredwray/qified/pull/73](https://github.com/jaredwray/qified/pull/73) * nats - chore: upgrading @biomejs/biome to 2.2.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/74](https://github.com/jaredwray/qified/pull/74) * qified - chore: upgrading @biomejs/biome to 2.2.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/75](https://github.com/jaredwray/qified/pull/75) * rabbitmq - chore: upgrading amqplib to 0.10.9 by @jaredwray in [https://github.com/jaredwray/qified/pull/76](https://github.com/jaredwray/qified/pull/76) * redis - chore: upgrading redis to 5.8.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/77](https://github.com/jaredwray/qified/pull/77) * mono - fix: moving to prePublishOnly for builds by @jaredwray in [https://github.com/jaredwray/qified/pull/78](https://github.com/jaredwray/qified/pull/78) **Full Changelog**: [https://github.com/jaredwray/qified/compare/v0.4.1...v0.4.2](https://github.com/jaredwray/qified/compare/v0.4.1...v0.4.2) ### v0.4.1 URL: https://qified.org/changelog/v0-4-1 Date: August 11, 2025 Tag: Release ## What's Changed * qified - chore: upgrading typescript to 5.9.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/64](https://github.com/jaredwray/qified/pull/64) * nats - chore: upgrading typescript to 5.9.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/65](https://github.com/jaredwray/qified/pull/65) * mono - fix: fixing the coverage reporting by @jaredwray in [https://github.com/jaredwray/qified/pull/66](https://github.com/jaredwray/qified/pull/66) * rabbitmq - chore: upgrading typescript to 5.9.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/67](https://github.com/jaredwray/qified/pull/67) * redis - chore: upgrading redis client to 5.8.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/68](https://github.com/jaredwray/qified/pull/68) * redis - docs: document API and contributing info for @qified/redis by @jaredwray in [https://github.com/jaredwray/qified/pull/69](https://github.com/jaredwray/qified/pull/69) * docs: add detailed NATS README by @jaredwray in [https://github.com/jaredwray/qified/pull/70](https://github.com/jaredwray/qified/pull/70) * docs: expand RabbitMQ README by @jaredwray in [https://github.com/jaredwray/qified/pull/71](https://github.com/jaredwray/qified/pull/71) **Full Changelog**: [https://github.com/jaredwray/qified/compare/2025](https://github.com/jaredwray/qified/compare/2025)-08-07...v0.4.1 ### v0.4.0 URL: https://qified.org/changelog/2025-08-07 Date: August 7, 2025 Tag: Release ## What's Changed * mono - migrating all project over to use biome from xojs by @jaredwray in [https://github.com/jaredwray/qified/pull/63](https://github.com/jaredwray/qified/pull/63) * nats - Add NATS message provider by @techntools in [https://github.com/jaredwray/qified/pull/62](https://github.com/jaredwray/qified/pull/62) ## New Contributors * @techntools made their first contribution in [https://github.com/jaredwray/qified/pull/62](https://github.com/jaredwray/qified/pull/62) **Full Changelog**: [https://github.com/jaredwray/qified/compare/2025](https://github.com/jaredwray/qified/compare/2025)-07-19...2025-08-07 ### 2025-07-19 URL: https://qified.org/changelog/2025-07-19 Date: July 19, 2025 Tag: Release ## What's Changed * qified - chore: upgraind xo to 1.0.5 by @jaredwray in [https://github.com/jaredwray/qified/pull/34](https://github.com/jaredwray/qified/pull/34) * qified - chore: upgrading tsup to 8.5.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/35](https://github.com/jaredwray/qified/pull/35) * qified - chore: upgrading vitest to 3.1.4 by @jaredwray in [https://github.com/jaredwray/qified/pull/36](https://github.com/jaredwray/qified/pull/36) * mono - upgrading docula to 0.12.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/37](https://github.com/jaredwray/qified/pull/37) * qified - chore: fixing the prepare script to use pnpm by @jaredwray in [https://github.com/jaredwray/qified/pull/38](https://github.com/jaredwray/qified/pull/38) * chore: updating readme logo path by @jaredwray in [https://github.com/jaredwray/qified/pull/39](https://github.com/jaredwray/qified/pull/39) * qified - chore: upgrading xo to 1.1.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/40](https://github.com/jaredwray/qified/pull/40) * qified - chore: upgrading vitest to 3.2.4 by @jaredwray in [https://github.com/jaredwray/qified/pull/41](https://github.com/jaredwray/qified/pull/41) * mono - chore: upgrading docula to 0.13.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/42](https://github.com/jaredwray/qified/pull/42) * mono - chore: upgrading vitest to 3.2.4 by @jaredwray in [https://github.com/jaredwray/qified/pull/43](https://github.com/jaredwray/qified/pull/43) * mono - fix: updating readme documentation on mono by @jaredwray in [https://github.com/jaredwray/qified/pull/44](https://github.com/jaredwray/qified/pull/44) * qified - feat: adding in TaskHandler type by @jaredwray in [https://github.com/jaredwray/qified/pull/45](https://github.com/jaredwray/qified/pull/45) * qified - chore moving memory message provider to new structure by @jaredwray in [https://github.com/jaredwray/qified/pull/46](https://github.com/jaredwray/qified/pull/46) * qified - chore: removing uris as it should be in each provider by @jaredwray in [https://github.com/jaredwray/qified/pull/47](https://github.com/jaredwray/qified/pull/47) * qified - feat: moving the subscriptions to be topic handlers by @jaredwray in [https://github.com/jaredwray/qified/pull/48](https://github.com/jaredwray/qified/pull/48) * qified - feat: adding in id for TopicHandlers by @jaredwray in [https://github.com/jaredwray/qified/pull/49](https://github.com/jaredwray/qified/pull/49) * Qified - feat: adding in initialized property for messaging by @jaredwray in [https://github.com/jaredwray/qified/pull/50](https://github.com/jaredwray/qified/pull/50) * qified - fix: removing init and initialized as not needed by @jaredwray in [https://github.com/jaredwray/qified/pull/51](https://github.com/jaredwray/qified/pull/51) * qified - feat: adding in disconnect for all providers by @jaredwray in [https://github.com/jaredwray/qified/pull/52](https://github.com/jaredwray/qified/pull/52) * qified - feat: adding in subscribe and publish by @jaredwray in [https://github.com/jaredwray/qified/pull/53](https://github.com/jaredwray/qified/pull/53) * redis - feat: Add Redis message provider package by @jaredwray in [https://github.com/jaredwray/qified/pull/54](https://github.com/jaredwray/qified/pull/54) * rabbitmq - feat: Add RabbitMQ message provider by @jaredwray in [https://github.com/jaredwray/qified/pull/55](https://github.com/jaredwray/qified/pull/55) * mono - chore: upgrading docula to 0.13.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/56](https://github.com/jaredwray/qified/pull/56) * qified - chore: upgrading xo to 1.2.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/57](https://github.com/jaredwray/qified/pull/57) * redis - chore: upgrading xo to 1.2.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/58](https://github.com/jaredwray/qified/pull/58) * redis - chore: upgrading redis to 5.6.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/59](https://github.com/jaredwray/qified/pull/59) * rabbitmq - chore: upgrading rabbitmq to 1.2.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/60](https://github.com/jaredwray/qified/pull/60) * mono - feat: adding in sync for versions by @jaredwray in [https://github.com/jaredwray/qified/pull/61](https://github.com/jaredwray/qified/pull/61) **Full Changelog**: [https://github.com/jaredwray/qified/compare/2025](https://github.com/jaredwray/qified/compare/2025)-05-10...2025-07-19 ### 2025-05-10 URL: https://qified.org/changelog/2025-05-10 Date: May 10, 2025 Tag: Release ## What's Changed * qified - chore: upgrading vitest to 3.0.9 by @jaredwray in [https://github.com/jaredwray/qified/pull/23](https://github.com/jaredwray/qified/pull/23) * qified - chore: upgrading docula to 0.11.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/24](https://github.com/jaredwray/qified/pull/24) * mono - chore: upgrading vitest to 3.1.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/25](https://github.com/jaredwray/qified/pull/25) * qified - upgrading vitest to 3.1.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/26](https://github.com/jaredwray/qified/pull/26) * qified - feat: adding in jsDoc for provider types by @jaredwray in [https://github.com/jaredwray/qified/pull/27](https://github.com/jaredwray/qified/pull/27) * mono -fix: updating the github actions permissions by @jaredwray in [https://github.com/jaredwray/qified/pull/29](https://github.com/jaredwray/qified/pull/29) * qified - chore: updating docula to 0.11.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/30](https://github.com/jaredwray/qified/pull/30) * qified - chore: upgrading vitest to 3.1.3 by @jaredwray in [https://github.com/jaredwray/qified/pull/31](https://github.com/jaredwray/qified/pull/31) * qified - feat: updating the type definition on message provider by @jaredwray in [https://github.com/jaredwray/qified/pull/32](https://github.com/jaredwray/qified/pull/32) * qified - feat: adding in memory message provider for testing by @jaredwray in [https://github.com/jaredwray/qified/pull/33](https://github.com/jaredwray/qified/pull/33) **Full Changelog**: [https://github.com/jaredwray/qified/compare/2025](https://github.com/jaredwray/qified/compare/2025)-03-02...2025-05-10 ### 2025-03-02 URL: https://qified.org/changelog/2025-03-02 Date: March 2, 2025 Tag: Release ## What's Changed * mono - chore: upgrading docula to 0.10.1 by @jaredwray in [https://github.com/jaredwray/qified/pull/19](https://github.com/jaredwray/qified/pull/19) * mono - chore: upgrading vitest to 3.0.7 by @jaredwray in [https://github.com/jaredwray/qified/pull/20](https://github.com/jaredwray/qified/pull/20) * qified - chore: upgrading tsup and typescript to lastest by @jaredwray in [https://github.com/jaredwray/qified/pull/21](https://github.com/jaredwray/qified/pull/21) * qified - chore: upgrading vitest to 3.0.7 by @jaredwray in [https://github.com/jaredwray/qified/pull/22](https://github.com/jaredwray/qified/pull/22) **Full Changelog**: [https://github.com/jaredwray/qified/compare/2025](https://github.com/jaredwray/qified/compare/2025)-02-07...2025-03-02 ### 2025-02-07 URL: https://qified.org/changelog/2025-02-07 Date: February 7, 2025 Tag: Release ## What's Changed * upgrading vitest to 2.1.6 by @jaredwray in [https://github.com/jaredwray/qified/pull/1](https://github.com/jaredwray/qified/pull/1) * upgrading typescript to 5.7.2 by @jaredwray in [https://github.com/jaredwray/qified/pull/2](https://github.com/jaredwray/qified/pull/2) * upgrading docula to 0.9.5 by @jaredwray in [https://github.com/jaredwray/qified/pull/3](https://github.com/jaredwray/qified/pull/3) * updating workflows to use pnpm by @jaredwray in [https://github.com/jaredwray/qified/pull/4](https://github.com/jaredwray/qified/pull/4) * upgrading xo to 0.60.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/5](https://github.com/jaredwray/qified/pull/5) * upgrading vitest to 2.1.8 by @jaredwray in [https://github.com/jaredwray/qified/pull/6](https://github.com/jaredwray/qified/pull/6) * upgrading docula to 0.9.6 by @jaredwray in [https://github.com/jaredwray/qified/pull/7](https://github.com/jaredwray/qified/pull/7) * adding in test services for redis and rabbitmq by @jaredwray in [https://github.com/jaredwray/qified/pull/8](https://github.com/jaredwray/qified/pull/8) * fixing header to be proper url by @jaredwray in [https://github.com/jaredwray/qified/pull/9](https://github.com/jaredwray/qified/pull/9) * migrating to mono repo by @jaredwray in [https://github.com/jaredwray/qified/pull/10](https://github.com/jaredwray/qified/pull/10) * qified - fix: adding in LICENSE file to project by @jaredwray in [https://github.com/jaredwray/qified/pull/11](https://github.com/jaredwray/qified/pull/11) * qified - upgrading typescript to 5.7.3 by @jaredwray in [https://github.com/jaredwray/qified/pull/12](https://github.com/jaredwray/qified/pull/12) * feat: adding in features to readme by @jaredwray in [https://github.com/jaredwray/qified/pull/13](https://github.com/jaredwray/qified/pull/13) * chore: upgrading actions to nodejs 22 by @jaredwray in [https://github.com/jaredwray/qified/pull/14](https://github.com/jaredwray/qified/pull/14) * chore: upgrading docula to 0.10.0 by @jaredwray in [https://github.com/jaredwray/qified/pull/15](https://github.com/jaredwray/qified/pull/15) * mono - chore: upgrading vitest to 3.0.5 by @jaredwray in [https://github.com/jaredwray/qified/pull/16](https://github.com/jaredwray/qified/pull/16) * qified - chore: upgrading vitest to 3.0.5 by @jaredwray in [https://github.com/jaredwray/qified/pull/17](https://github.com/jaredwray/qified/pull/17) * qified - chore: upgrading tsup to 8.3.6 by @jaredwray in [https://github.com/jaredwray/qified/pull/18](https://github.com/jaredwray/qified/pull/18) ## New Contributors * @jaredwray made their first contribution in [https://github.com/jaredwray/qified/pull/1](https://github.com/jaredwray/qified/pull/1) **Full Changelog**: [https://github.com/jaredwray/qified/commits/2025](https://github.com/jaredwray/qified/commits/2025)-02-07