Features of Kyo͞o
Kyo͞o is designed to provide a normalized interface for interacting with a variety of queue brokers which have different implementation methods. The end goal is to allow seamless integration of any queue broker regardless of which underlying technology is used, much in the same way that query builder libraries such as knex.js allow you to interact with a multitude of database technologies.
It provides:
- A configurable connection layer with typed event emitters.
- A standard queue interface to enqueue, fetch, count, purge, or requeue jobs.
- A job abstraction supporting ack/nack, payload serialization, and optional expiration/priority.
- A worker abstraction to process jobs in either manual-ack or auto-ack mode.
Supported Queue Brokers / Protocols
Broker / Protocol | Underlying Client | Configuration Interface |
---|---|---|
AMQP | amqp-client.js | AMQPAdapterConfiguration |
Redis | bullmq | BullMQAdapterConfiguration |
Amazon SQS | aws-sdk/client-sqs | SQSAdapterConfiguration |
List of Features
Feature | AMQP | Redis | SQS |
---|---|---|---|
Manage the connection state for all queues and workers from a single connection | ✅ | ✅ | ✅ |
Allows the creation of queue and worker instances without a connection being established | ✅ | ✅ | ✅ |
Allows the fetching of a workable job without needing to create a worker | ✅ | ✅ | ✅ |
Allows the enqueuing of multiple jobs simultaneously | ✅ | ✅ | ✅ |
Advanced job configuration such as expiration, priority & maximum attempts | ✅ | ✅ | ⚠️⚠️ |
Allows the non-destructive fetching of queue jobs withing needing to create a worker | ✅ | ✅ | ✅ |
Provides a method which returns the number of unprocessed jobs | ✅ | ✅ | ✅ |
Provides a method which empties a queue of all unprocessed jobs | ✅ | ✅ | ✅ |
Allows automatic acknowledgement of jobs both when retrieved for work from a queue or via a worker | ✅ | ✅ | ✅ |
Allows manual acknowledgement (ack ) of jobs both when retrieved for work from a queue or via a worker | ✅ | ✅ | ✅ |
Allows manual negative acknowledgement (nack ) with a requeue flag which allows a job to be requeued to either the beginning or end of the queue | ⚠️ | ✅ | ⚠️ |
Serializes payloads in a way which preserves complex data types | ✅ | ✅ | ✅ |
Allows workers to be paused and resumed | ✅ | ✅ | ✅ |
Gracefully handles errors thrown within worker processor functions | ✅ | ✅ | ✅ |
⚠️ Not completely implemented
Due to underlying differences in the protocol, this feature does not work under every condition. Some cases where there is a mix of priority / maximum attempt limitations may result in the behavior being changed.
⚠️⚠️ No priority support
Due to underlying protocol restrictions this queue broker does not support job prioritization.