A multi-transport job queue plugin for the Seneca.js microservices framework, allowing creation and management of task queues with support for in-memory and custom transports (e.g., Amazon SQS). Version 0.3.0 is the current stable release, with low release cadence (last update years ago). It provides start/stop/enqueue commands, concurrency control, and round-robin distribution across multiple processes. Differentiator: integrates deeply with Seneca's action patterns, enabling queue-driven microservices without external dependencies for basic use.
npm install seneca-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up an in-memory queue, defines a worker for 'my task', enqueues a message, and stops the queue after processing.
Consider using modern job queues like Bull or Bee-Queue for new projects.
For custom transports, concurrency must be handled in the transport implementation.
Always add action patterns (s.add) before calling s.act({ role: 'queue', cmd: 'start' }).Implement proper error handling and retry logic in workers to avoid blacklisting.
Ensure s.use('queue') is called before s.act({ role: 'queue', cmd: 'enqueue', ... }).Use const s = require('seneca')() to create the instance.Add s.add({ task: 'my task' }, handler) before s.act({ role: 'queue', cmd: 'start' }).