Skip to content

domwebber/mqueue

Repository files navigation

mqueue (Multi-Queue)

npm (scoped)

Simple queue interface with support for multiple backends. Keep your options open.

Note: This project is currently a Work in Progress. Its not ready for production use yet - make a contribution.

Getting Started

To learn how to use MQueue, check out the @mqueue/queue README. To learn how to use a specific queue adapter, check out the README for that adapter under Queue Adapters.

For queue and transport compatibility, see the compatibility table in the @mqueue/queue README.

import MQueue from "@mqueue/queue";
// const MQueue = require("@mqueue/queue");

const outgoingQueue = new MQueue.Outgoing(
  await AmqplibOutgoingQueue.connect("amqp://rabbitmq:5271", "queue-name"),
);

outgoingQueue.sendMessage({
  headers: { "Account-ID": "123" },
  body: "...",
});

// ...

const incomingQueue = new MQueue.Incoming(
  await AmqplibIncomingQueue.connect("amqp://rabbitmq:5271", "queue-name"),
);

For more usage examples, see the @mqueue/queue readme.

Packages

  • @mqueue/queue: Simple queue interface with support for multiple backends

Queue Adapters

Broadcast Strategies

Credit

This package was inspired by Keyv, Flystorage, and Flysystem.

The concept for this package was to create the Keyv for Queue backends - simply abstracting the interface for different queue backends to remain flexible and keep options open.

License

MIT © Dom Webber

About

A simple queue interface with support for multiple backends

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •