{"id":45983,"library":"queue-proccessor","title":"Queue Proccessor","description":"A lightweight queue processor for managing asynchronous task dispatch, version 0.1.8, with moderate release cadence. Provides a centralized queue that can be started and stopped, ensuring messages are processed sequentially to avoid loss from unawaited promises. Simpler alternatives include bull or async queues, but this package offers minimal setup and built-in TypeScript types.","status":"active","version":"0.1.8","language":"javascript","source_language":"en","source_url":"https://github.com/reytuty/queue-proccessor","tags":["javascript","queue handler","queue proccessor","queue proccess","typescript"],"install":[{"cmd":"npm install queue-proccessor","lang":"bash","label":"npm"},{"cmd":"yarn add queue-proccessor","lang":"bash","label":"yarn"},{"cmd":"pnpm add queue-proccessor","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Named export only. Default import will not work.","wrong":"import QueueProccessor from \"queue-proccessor\"","symbol":"QueueProccessor","correct":"import { QueueProccessor } from \"queue-proccessor\""},{"note":"CommonJS destructure required because it's a named export.","wrong":"const QueueProccessor = require(\"queue-proccessor\")","symbol":"QueueProccessor","correct":"const { QueueProccessor } = require(\"queue-proccessor\")"},{"note":"TypeScript generic is optional but recommended for type safety.","wrong":"const queue = new QueueProccessor(handler)","symbol":"QueueProccessor<Type>","correct":"const queue = new QueueProccessor<number>(handler)"}],"quickstart":{"code":"import { QueueProccessor } from \"queue-proccessor\";\n\nasync function handler(data: { id: number }) {\n  return new Promise<void>((resolve) => {\n    setTimeout(() => {\n      console.log(\"Processed:\", data.id);\n      resolve();\n    }, 100);\n  });\n}\n\nconst queue = new QueueProccessor<{ id: number }>(handler);\nqueue.add({ id: 1 });\nqueue.add({ id: 2 });\nqueue.start();\nsetTimeout(() => queue.stop(), 500);\nconsole.log(\"Length:\", queue.queueLength);","lang":"typescript","description":"Demonstrates creating a QueueProccessor with a typed async handler, adding items, starting and stopping the queue."},"warnings":[{"fix":"Use 'queue-proccessor' in package.json and imports.","message":"Package name is misspelled 'proccessor' (double c) - ensure import path matches exactly.","severity":"gotcha","affected_versions":"<=0.1.8"},{"fix":"Wrap handler errors manually or use a global error handler.","message":"add() method does not return a promise; errors inside handler will not be caught by add() caller.","severity":"gotcha","affected_versions":"<=0.1.8"},{"fix":"Check isProccessing after stop() to ensure queue fully stopped.","message":"stop() does not prevent the current handler from finishing; isProccessing remains true until handler completes.","severity":"breaking","affected_versions":"<=0.1.8"},{"fix":"Always specify the generic type for type safety, e.g., QueueProccessor<number>.","message":"Generic type parameter is optional but if omitted, data will be typed as Object.","severity":"gotcha","affected_versions":"<=0.1.8"},{"fix":"Evaluate alternatives if reliability is critical.","message":"No official deprecation warnings, but package has low maintenance; consider migrating to more robust solutions like bull or async-queue.","severity":"deprecated","affected_versions":"<=0.1.8"}],"env_vars":null,"search_vec":"'0.1.8':13 'altern':40 'async':44 'asynchron':9 'avoid':34 'built':54 'built-in':53 'bull':42 'cadenc':17 'central':20 'dispatch':11 'ensur':28 'handler':60 'includ':41 'javascript':58 'lightweight':4 'loss':35 'manag':8 'messag':29 'minim':50 'moder':15 'offer':49 'packag':48 'proccess':64 'proccessor':2,62 'process':31 'processor':6 'promis':38 'provid':18 'queue':1,5,21,45,59,61,63 'releas':16 'sequenti':32 'setup':51 'simpler':39 'start':25 'stop':27 'task':10 'type':57 'typescript':56,65 'unawait':37 'version':12","created_at":"2026-06-07T12:57:42.505945+00:00","updated_at":"2026-06-07T12:57:42.505945+00:00","problems":[{"fix":"import { QueueProccessor } from 'queue-proccessor'","cause":"Default import used instead of named import.","error":"TypeError: queue_proccessor_1.QueueProccessor is not a constructor"},{"fix":"npm install queue-proccessor && ensure tsconfig.json includes node_modules","cause":"Package might not be installed or TypeScript cannot resolve types.","error":"Cannot find module 'queue-proccessor' or its corresponding type declarations."},{"fix":"Use import { QueueProccessor } from 'queue-proccessor' and check package version.","cause":"Wrong import or older version where method names differed.","error":"Property 'start' does not exist on type 'QueueProccessor<Object>'."}],"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/reytuty/queue-proccessor#readme","github":"https://github.com/reytuty/queue-proccessor","docs":null,"changelog":null,"pypi":null,"npm":"queue-proccessor","openapi_spec":null,"status_page":null,"smithery":null,"categories":["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}}