{"id":44550,"library":"cf-queue","title":"cf-queue - Queue wrapper for nats.io","description":"cf-queue is a lightweight queue wrapper for NATS.io, facilitating a request-response pattern between clients and workers. The latest version is 0.0.21 (as of early 2023). Released via npm, the package is actively maintained by Codefresh. It simplifies building distributed job queues with progress reporting, using NATS as the message broker. Key differentiators include a simple API for creating queues, built-in progress support, and integration with Docker for easy deployment. However, it has low adoption and minimal documentation beyond the README.","status":"active","version":"0.0.21","language":"javascript","source_language":"en","source_url":"https://github.com/codefresh/queue","tags":["javascript","NATS"],"install":[{"cmd":"npm install cf-queue","lang":"bash","label":"npm"},{"cmd":"yarn add cf-queue","lang":"bash","label":"yarn"},{"cmd":"pnpm add cf-queue","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency: cf-queue wraps nats.io functionality.","package":"nats","optional":false}],"imports":[{"note":"cf-queue is CommonJS-only. There is no ES module equivalent.","wrong":"import Queue from 'cf-queue'; // ESM not supported; package is CommonJS only","symbol":"Queue","correct":"const Queue = require('cf-queue');"},{"note":"Default export, no named exports.","symbol":"Queue","correct":"const Queue = require('cf-queue');"}],"quickstart":{"code":"const Queue = require('cf-queue');\n\nconst options = { servers: ['nats://localhost:4222'] };\nconst queue = new Queue('my-queue', options);\n\n// Client side: send a request\nconst request = { id: 1, message: 'hello' };\nqueue.request(request)\n  .then(response => console.log(response))\n  .catch(err => console.error(err));\n\n// Worker side: process jobs\nqueue.process((job, callback) => {\n  const request = job.request;\n  const response = { id: request.id, message: request.message + ' world!!!' };\n  callback(null, response);\n});","lang":"javascript","description":"Initializes a queue, pushes a request as a client, and processes jobs as a worker."},"warnings":[{"fix":"Use CommonJS require() instead of ESM import.","message":"The package is not compatible with ES modules (import syntax). Use require() only.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Test progress behavior thoroughly before using in production.","message":"Progress support may not be fully documented or stable; relies on undocumented NATS features.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Monitor the repository or consider alternatives like Bull or Bee-Queue.","message":"The package has low maintenance; issues or PRs may not be addressed promptly.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.0.21':32 '2023':36 'activ':43 'adopt':87 'api':67 'beyond':91 'broker':61 'build':49 'built':72 'built-in':71 'cf':2,9 'cf-queue':1,8 'client':25 'codefresh':46 'creat':69 'deploy':82 'differenti':63 'distribut':50 'docker':79 'document':90 'earli':35 'easi':81 'facilit':18 'howev':83 'includ':64 'integr':77 'javascript':94 'job':51 'key':62 'latest':29 'lightweight':13 'low':86 'maintain':44 'messag':60 'minim':89 'nat':57,95 'nats.io':7,17 'npm':39 'packag':41 'pattern':23 'progress':54,74 'queue':3,4,10,14,52,70 'readm':93 'releas':37 'report':55 'request':21 'request-respons':20 'respons':22 'simpl':66 'simplifi':48 'support':75 'use':56 'version':30 'via':38 'worker':27 'wrapper':5,15","created_at":"2026-06-07T12:50:40.845326+00:00","updated_at":"2026-06-07T12:50:40.845326+00:00","problems":[{"fix":"npm install nats","cause":"Missing peer dependency nats.","error":"Error: Cannot find module 'nats'"},{"fix":"Ensure your NATS server and client versions are compatible, and that progress is enabled on the queue.","cause":"Progress method not available if NATS version mismatches or queue not properly configured.","error":"TypeError: queue.request(...).progress is not a function"}],"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":"https://github.com/codefresh/queue","github":"https://github.com/codefresh/queue","docs":null,"changelog":null,"pypi":null,"npm":"cf-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}}