Skip to content

domwebber/mqueue

Repository files navigation

mqueue (Multi-Queue)

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.

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"),
);

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.

Packages

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

Queue Adapters

Broadcast Strategies

Compatibility

Why might you need a Message Queue?

  • NodeJS v18+, tested on v22+
Queue Platform Queue Adapter
Apache ActiveMQ (AMQP v1.0) @mqueue/rhea
Apache ActiveMQ (MQTT) @mqueue/mqtt
Apache ActiveMQ (STOMP) @mqueue/stompjs
Apache Kafka @mqueue/kafkajs
AWS Simple Queue Service (SQS) @mqueue/sqs
Azure Service Bus @mqueue/azure-service-bus
Azure Service Bus (AMQP v1.0) @mqueue/rhea
Eclipe Mosquitto @mqueue/mqtt
ElasticMQ (SQS-Compatible) @mqueue/sqs
Fastq @mqueue/fastq
RabbitMQ (AMQP v0.9.1) @mqueue/amqplib
RabbitMQ (AMQP v1.0 or with AMQP v1.0 Plugin) @mqueue/rhea
RabbitMQ (with MQTT Plugin) @mqueue/mqtt
RabbitMQ (with STOMP Plugin) @mqueue/stompjs

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

  •  
  •  
  •