A simple message queue library for Node.js with produce/consume pattern. Version 0.1.0 provides basic in-process message queuing where a producer can push a message and get a promise-based receipt that resolves when a consumer acknowledges the message. The library is minimal (single function returning an object with `produce` and `consume` methods). It uses UUID for message IDs and timestamps. No external dependencies. The project appears to be in early development (v0.1.0) with no recent releases, no TypeScript definitions, and no documentation on concurrency, persistence, or error handling. It is mainly useful for simple in-memory async workflows.
npm install consume-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: create a queue, produce a message, then consume it with a callback, and handle the receipt promise.
Call messageQueue() to get the queue instance, then destructure produce and consume.
Ensure the argument to consume is `{ id: message.id, data: '...' }`. It does not accept separate arguments.Use CommonJS require. For TypeScript, create a declaration file or use `require('consume-queue')` with `allowSyntheticDefaultImports`.Pin exact version in package.json.
Use `const messageQueue = require('consume-queue'); const queue = messageQueue();`Run `npm install consume-queue --save` and ensure node_modules is present.
Correct: `const { produce } = messageQueue();`Ensure you call produce() and store the result: `const { receipt } = produce({a:1});`No dependency data recorded yet.