@winglibs/fifoqueue
v0.0.12
Published
A wing library to work with FIFO (first-in first-out) Queues
Downloads
8
Readme
fifoqueue
A wing library to work with FIFO (first-in first-out) Queues.
To use the queue, set groupId
to group messages and process them in an ordered fashion.
Prerequisites
Installation
npm i @winglibs/fifoqueue
Usage
bring fifoqueue;
let queue = new fifoqueue.FifoQueue();
queue.setConsumer(inflight (message: str) => {
log("recieved message {message}");
});
test "will push to queue" {
queue.push("a new message", groupId: "myGroup");
}
License
This library is licensed under the MIT License.