{"id":44997,"library":"ftp-management-queue","title":"FTP Management Queue","description":"Queue-based file processing system for FTP/SFTP servers (v5.7.1). Uses Kue (Redis-backed) to monitor upload directories, enqueue files, and process them with user-defined callbacks. Supports multiple FTP configurations, file format filtering, and concurrency control. Differentiates itself by combining FTP monitoring with job queue management, handling file state transitions (upload → enqueued → processing → processed/error). Stable but infrequently updated. Requires Redis and Kue as peer dependencies.","status":"active","version":"5.7.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","kue","ftp","uploader","uploader queue"],"install":[{"cmd":"npm install ftp-management-queue","lang":"bash","label":"npm"},{"cmd":"yarn add ftp-management-queue","lang":"bash","label":"yarn"},{"cmd":"pnpm add ftp-management-queue","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Redis-backed job queue used for queue management and processing","package":"kue","optional":false},{"reason":"Kue depends on Redis server","package":"redis","optional":false}],"imports":[{"note":"Package uses CommonJS and exports a function. ES import may not work without special configuration.","wrong":"import FtpManagementQueue from 'ftp-management-queue';","symbol":"default","correct":"const FtpManagementQueue = require('ftp-management-queue'); FtpManagementQueue(options);"},{"note":"Exported directly as function, not as named export.","wrong":"const { FtpManagementQueue } = require('ftp-management-queue');","symbol":"factory","correct":"const FtpManagementQueue = require('ftp-management-queue');"},{"note":"Library is invoked as a function, not a constructor. No 'new' keyword.","wrong":"const queue = new FtpManagementQueue(options);","symbol":"function call","correct":"FtpManagementQueue(options);"}],"quickstart":{"code":"const kue = require('kue');\nconst queue = kue.createQueue();\n\nconst processFile = (params, cb) => {\n  console.log(`Processing file: ${params.fileName}`);\n  setTimeout(() => {\n    cb();\n  }, 10000);\n};\n\nconst options = {\n  queue,\n  fileFormats: ['.csv'],\n  numberOfProcess: {\n    itemsManagerProcess: 1,\n    fileBatchProcess: 1\n  },\n  processNames: {\n    manager: 'manager-queue',\n    processor: 'processor-queue'\n  },\n  items: [\n    {\n      id: '1',\n      name: 'Brand1',\n      priority: 'normal',\n      type: 'ftp',\n      ftp: {\n        host: process.env.FTP_HOST ?? '',\n        port: 21,\n        user: process.env.FTP_USER ?? '',\n        password: process.env.FTP_PASSWORD ?? ''\n      },\n      dir: {\n        upload: '/path/to/upload',\n        enqueued: '/path/to/enqueued',\n        processing: '/path/to/processing',\n        error: '/path/to/error',\n        processed: '/path/to/processed',\n        backup: '/path/to/backup'\n      }\n    }\n  ],\n  customCallback: processFile,\n  filePath: __dirname\n};\n\nconst FtpManagementQueue = require('ftp-management-queue');\nFtpManagementQueue(options);","lang":"javascript","description":"Basic setup that monitors an FTP directory, enqueues CSV files, and processes them with a custom callback that runs for 10 seconds."},"warnings":[{"fix":"Create a fresh options object for each FtpManagementQueue call.","message":"The library mutates the options object; do not reuse the same options object for multiple calls.","severity":"gotcha","affected_versions":"*"},{"fix":"Use Bull with 'ftp-management-queue' wrapper or switch to a different queue-based FTP processor.","message":"Kue is no longer actively maintained; consider Bull or Bee-Queue for new projects.","severity":"deprecated","affected_versions":">=5.0.0"},{"fix":"Use path.resolve(__dirname, 'relative/path') or absolute paths.","message":"All directory paths must be absolute; relative paths may cause unexpected behavior.","severity":"gotcha","affected_versions":"*"},{"fix":"If you need XML processing, stay on v4.x or handle XML parsing in customCallback.","message":"Removed support for XML file parsing in v5. Refer to XML-specific options no longer work.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Ensure Redis is installed and running. Use queue.client for advanced configuration.","message":"The library assumes Redis is running on default localhost:6379. No connection error handling.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'back':18 'base':6 'callback':32 'combin':46 'concurr':41 'configur':36 'control':42 'defin':31 'depend':71 'differenti':43 'directori':22 'enqueu':23,58 'file':7,24,37,54 'filter':39 'format':38 'ftp':1,35,47,74 'ftp/sftp':11 'handl':53 'infrequ':63 'javascript':72 'job':50 'kue':15,68,73 'manag':2,52 'monitor':20,48 'multipl':34 'peer':70 'process':8,26,59 'processed/error':60 'queue':3,5,51,77 'queue-bas':4 'redi':17,66 'redis-back':16 'requir':65 'server':12 'stabl':61 'state':55 'support':33 'system':9 'transit':56 'updat':64 'upload':21,57,75,76 'use':14 'user':30 'user-defin':29 'v5.7.1':13","created_at":"2026-06-07T12:52:51.428067+00:00","updated_at":"2026-06-07T12:52:51.428067+00:00","problems":[{"fix":"Ensure processNames.manager and processNames.processor are defined as non-empty strings.","cause":"Missing or incorrect queue name in processNames.","error":"Error: Job cannot be created without a type"},{"fix":"Make sure to bind the job context or reference 'this.job' correctly (see README snippet).","cause":"customCallback is invoked without proper 'this' context for job logging.","error":"TypeError: Cannot read property 'log' of undefined"},{"fix":"Start Redis server: 'redis-server' or set via environment variable REDIS_URL.","cause":"Redis server is not running or not accessible.","error":"Error: connect ECONNREFUSED 127.0.0.1:6379"},{"fix":"Create all required directories (upload, enqueued, processing, error, processed, backup) before starting.","cause":"One of the directory paths specified does not exist or is a file.","error":"Error: ENOTDIR: not a directory, scandir '/path/to/upload'"}],"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":"ftp-management-queue","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage","devops"],"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}}