Glidemq Fastify banner
avifenesh avifenesh

Glidemq Fastify

Development community

Description

Fastify plugin for glide-mq queue management

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

@glidemq/fastify

[![npm](https://img.shields.io/npm/v/@glidemq/fastify)](https://www.npmjs.com/package/@glidemq/fastify) [![license](https://img.shields.io/npm/l/@glidemq/fastify)](https://github.com/avifenesh/glidemq-fastify/blob/main/LICENSE)

Fastify v5 plugin that turns [glide-mq](https://github.com/avifenesh/glide-mq) queues into a REST API with real-time SSE. Two registrations give you queue operations, schedulers, flow orchestration over HTTP, rolling usage summaries, and broadcast routes.

Why

  • Zero route boilerplate - declare queues, get job CRUD, metrics, schedulers, and SSE endpoints
  • Testable without Valkey - createTestApp builds an in-memory Fastify instance for app.inject() assertions
  • Serverless producers - lightweight POST /:name/produce endpoint for Lambda/edge functions that only enqueue jobs

Install

npm install @glidemq/fastify glide-mq fastify

Optional - install `zod` for request validation (falls back to manual checks otherwise).

Requires **glide-mq >= 0.15.2** and **Fastify 5+**.

Quick start

import Fastify from "fastify";
import { glideMQPlugin, glideMQRoutes } from "@glidemq/fastify";

const app = Fastify();

await app.register(glideMQPlugin, {
  connection: { addresses: [{ host: "localhost", port: 6379 }] },
  queues: {
    emails: {
      processor: async (job) => {
        await sendEmail(job.data.to, job.data.subject);
        return { sent: true };
      },
      concurrency: 5,
    },
  },
});

await app.register(glideMQRoutes, { prefix: "/api/queues" });
await app.listen({ port: 3000 });

`glideMQPlugin` creates a registry on `app.glidemq`. `glideMQRoutes` mounts the full queue-management API. The `onClose` hook handles graceful shutdown.

AI-native endpoints

glide-mq 0.14+ provides AI orchestration primitives - token/cost tracking, real-time streaming, human-in-the-loop suspend/signal, model failover chains, budget caps, dual-axis rate limiting, and vector search. This p