Registry / messaging / cantina-queue

cantina-queue

JSON →
library3.0.2jsnpmunverified

Amino queue interface for cantina applications. Current stable version 3.0.2. Provides app.queue() for scheduling work, app.loadQueueWorkers() for loading worker modules, and exposes the full amino queue API via app.amino.queue. Integrates with RabbitMQ via amino-queue and requires cantina-amino. Works with Node.js and CommonJS. Release cadence unknown; last update likely around 2013.

npm install cantina-queue
INSTALL
IMPORT
SIG · CANTINA-QUEUE
C
cantina-queue
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.

app.queue
app.queue('queue:key', payload)
Exposed on the cantina app instance. No direct import; cantina-queue is a plugin that adds this method.
app.loadQueueWorkers
app.loadQueueWorkers(dir, cwd)
Exposed on the app. Reads worker modules from a directory.
app.amino.queue
app.amino.queue
Full amino queue API exposed via app property.

Shows how to require the plugin, schedule a queue job, and define a worker module.

var cantina = require('cantina'); require('cantina-queue'); cantina.setup(function(err) { if (err) throw err; // Queue some work cantina.queue('my:queue', {hello: 'world'}); }); // Worker file: workers/my-queue.js module.exports = { queue: 'my:queue', worker: function(payload, cb) { console.log('Processing:', payload); cb(); } };
Debug
Known issues
gotchaQueue workers are automatically loaded from <app.root>/workers on app start. Ensure this directory exists and modules export the expected format (queue key + worker function).
fix
Create a workers/ directory in your app root with properly structured modules.
affects: >=3.0.0
gotchaThe worker function signature is function(payload, cb). The callback must be called to acknowledge completion. Failure to call cb may cause the queue to stall.
fix
Always invoke cb() when done, even on error (pass error as first argument).
affects: >=3.0.0
gotchaRequires a running RabbitMQ server. Does not provide an in-memory fallback.
fix
Install and start RabbitMQ before using the plugin.
affects: >=3.0.0
Errors
Common errors & fixes
Error: Cannot find module 'cantina-amino'
Missing peer dependency cantina-amino
fix
npm install cantina-amino
Error: Cannot find module 'amino-queue'
Missing direct dependency amino-queue
fix
npm install amino-queue
Error: connect ECONNREFUSED 127.0.0.1:5672
RabbitMQ server not running
fix
Start RabbitMQ: rabbitmq-server
Upgrade
Version history
3.0.2latest on npm
Audit
Dependencies
cantina-aminorequiredrequired peer dependency
amino-queuerequireddirect dependency for queue API
Agent activity
28 hits · last 30 days
node
26
Amazon
1
OpenAI (training)
1
Resources
cantina-queue — npm install cantina-queue · libregistry