Registry / messaging / procession

procession

JSON →
library3.0.2jsnpmunverified

Procession is an asynchronous message queue library for JavaScript and TypeScript. The current stable version is 3.0.2, released in July 2022. It provides backpressure-aware queues for coordinating concurrent tasks, with a simple API for push and pull operations. Key differentiators include its lightweight footprint, no external runtime dependencies, and support for both Node.js and browser environments. It uses a Promise-based interface and supports multiple queue strategies like FIFO and prioritized queues.

npm install procession
INSTALL
IMPORT
SIG · PROCESSION
P
procession
messagingjavascriptv3.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Queue
import { Queue } from 'procession'
import Queue from 'procession'
Queue is a named export, not a default export.
push
import { push } from 'procession'
push is a named export used to enqueue items.
pull
import { pull } from 'procession'
const { pull } = require('procession')
Since v3, ESM is required; CommonJS require will fail.

Creates a queue, enqueues two items using push, then dequeues them using pull, demonstrating basic operations.

import { Queue, push, pull } from 'procession'; async function main() { const queue = new Queue(); await push(queue, 'task1'); await push(queue, 'task2'); const result1 = await pull(queue); console.log(result1); // 'task1' const result2 = await pull(queue); console.log(result2); // 'task2' } main().catch(console.error);
Debug
Known issues
breakingIn v3, the package is ESM-only; using require() will throw a Module not found error.
fix
Use import syntax, or downgrade to v2 if CommonJS is required.
affects: >=3.0.0
gotchapush and pull are async functions and must be awaited; forgetting await can lead to unresolved promises.
fix
Always use await when calling push or pull.
affects: >=1.0.0
deprecatedThe 'size' property on Queue instances is deprecated in v3; use the 'length' property instead.
fix
Use queue.length instead of queue.size.
affects: >=3.0.0
gotchaQueue does not support infinite capacity; it has a default maximum of 1024 items. Pushing beyond capacity will reject the promise.
fix
Check queue.length before pushing, or configure a larger capacity via constructor options.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: queue.push is not a function
Using push as a method on the Queue instance, but push is a standalone function.
fix
Use import { push } from 'procession' and call push(queue, item).
Module not found: Error: Can't resolve 'procession'
Package not installed or ESM-only import with require() in v3.
fix
Run npm install procession, and use import syntax instead of require().
UnhandledPromiseRejectionWarning: Error: Backpressure limit exceeded
Queue capacity exceeded; default max 1024 items.
fix
Increase capacity via new Queue({ max: 2048 }) or drain the queue before adding more.
Upgrade
Version history
3.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources
procession — npm install procession · libregistry