{"id":44720,"library":"devbox-queue","title":"Devbox Queue","description":"A lightweight RabbitMQ wrapper for Node.js that provides simplified publisher and listener interfaces. Version 1.0.9, released with infrequent updates. Supports configurable queues, logging, and message persistence. Differentiates from amqplib by abstracting connection and channel management into a simple callback-based API. Primarily designed for internal use in the Devbox ecosystem.","status":"active","version":"1.0.9","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","queue","rabbitmq"],"install":[{"cmd":"npm install devbox-queue","lang":"bash","label":"npm"},{"cmd":"yarn add devbox-queue","lang":"bash","label":"yarn"},{"cmd":"pnpm add devbox-queue","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"RabbitMQ client library for AMQP protocol","package":"amqplib","optional":false}],"imports":[{"note":"The package exports a factory function that must be called with a config object. Destructuring the require directly will not work.","wrong":"const { publisher, listener } = require('devbox-queue');","symbol":"default (factory function)","correct":"const amqp = require('devbox-queue')(config);"}],"quickstart":{"code":"const config = {\n  queueName: 'my-queue',\n  uri: process.env.RABBITMQ_URI ?? 'amqp://localhost',\n  log: console.log,\n  logCollectionName: 'queueLogs',\n  caller: 'my-service',\n  persistent: false\n};\n\nconst amqp = require('devbox-queue')(config);\n\n// Listener\namqp.listener(function (message, removeFromQueue) {\n  console.log('Received:', message);\n  removeFromQueue();\n});\n\n// Publisher\nconst msg = { meta: {}, body: { text: 'Hello' } };\namqp.publisher(msg, function (err, data) {\n  if (err) console.error('Publish error:', err);\n  else console.log('Published:', data);\n});","lang":"javascript","description":"Shows full setup: config object, listener with message handling, and publisher with callback."},"warnings":[{"fix":"Provide a valid AMQP URI, e.g., 'amqp://user:pass@host:5672/vhost'.","message":"The config object requires 'uri' but the README shows 'path-queue' which is not a valid URI format.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always call removeFromQueue() after processing to avoid message accumulation.","message":"The listener callback must call removeFromQueue() to acknowledge the message; otherwise messages may be re-delivered.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.9':17 'abstract':33 'amqplib':31 'api':44 'base':43 'callback':42 'callback-bas':41 'channel':36 'configur':23 'connect':34 'design':46 'devbox':1,52 'differenti':29 'ecosystem':53 'infrequ':20 'interfac':15 'intern':48 'javascript':54 'lightweight':4 'listen':14 'log':25 'manag':37 'messag':27 'node.js':8 'persist':28 'primarili':45 'provid':10 'publish':12 'queue':2,24,55 'rabbitmq':5,56 'releas':18 'simpl':40 'simplifi':11 'support':22 'updat':21 'use':49 'version':16 'wrapper':6","created_at":"2026-06-07T12:51:30.779501+00:00","updated_at":"2026-06-07T12:51:30.779501+00:00","problems":[{"fix":"Use: const amqp = require('devbox-queue')(config);","cause":"Importing the package incorrectly (e.g., using destructuring).","error":"TypeError: amqp is not a function"},{"fix":"Ensure RabbitMQ is running and URI config is correct.","cause":"RabbitMQ server not running or wrong URI.","error":"Error: connect ECONNREFUSED ::1:5672"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"devbox-queue","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}