{"id":46511,"library":"sqs-queue-processor","title":"sqs-queue-processor","description":"An event-based AWS SQS queue processor library for Node.js (v1.0.0, stable). It provides long polling with customizable options, emits events for message processing lifecycle (start, stop, before_poll, after_poll, message, error), and supports custom message parsing. Differentiators: simple event-driven API, no external dependencies beyond AWS SDK, and automatic long polling. Ideal for lightweight SQS message consumption without full framework overhead.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://miskiw@github.com/miskiw/sqs-queue-processor","tags":["javascript","sqs","queue","processor","aws"],"install":[{"cmd":"npm install sqs-queue-processor","lang":"bash","label":"npm"},{"cmd":"yarn add sqs-queue-processor","lang":"bash","label":"yarn"},{"cmd":"pnpm add sqs-queue-processor","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CJS-only package. ES import will fail.","wrong":"import QueueProcessor from 'sqs-queue-processor'","symbol":"QueueProcessor","correct":"const QueueProcessor = require('sqs-queue-processor')"}],"quickstart":{"code":"const QueueProcessor = require('sqs-queue-processor');\nconst processor = new QueueProcessor({\n  queueUrl: process.env.QUEUE_URL ?? 'https://sqs.us-east-1.amazonaws.com/12345678910/MyQueueUrl',\n  awsRegion: process.env.AWS_REGION ?? 'us-east-1'\n});\nprocessor.on('message', (msg) => {\n  console.log('Received:', msg.Body);\n  // Process and then delete message\n  // auto-delete not provided; you must call sqs.deleteMessage()\n});\nprocessor.on('error', (err) => console.error('Error:', err));\nprocessor.start();","lang":"javascript","description":"Creates a QueueProcessor, attaches message and error event handlers, and starts polling the SQS queue."},"warnings":[{"fix":"In the 'message' event handler, call sqs.deleteMessage({ QueueUrl, ReceiptHandle: msg.ReceiptHandle }).promise()","message":"The library does not automatically delete messages after processing. You must manually call sqs.deleteMessage() after successful processing or messages will be reprocessed after VisibilityTimeout expires.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use onMessageParse: function(msg) { return { ...msg, Body: JSON.parse(msg.Body) }; }","message":"The onMessageParse option mutates the original message object instead of returning a new one. If you need the original message, clone it inside the parser.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"npm install aws-sdk@2.x","message":"The package uses the legacy AWS SDK v2. You must install aws-sdk separately. AWS SDK v3 is not supported.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'api':49 'automat':57 'aw':9,54,74 'base':8 'beyond':53 'consumpt':65 'custom':41 'customiz':23 'depend':52 'differenti':44 'driven':48 'emit':25 'error':38 'event':7,26,47 'event-bas':6 'event-driven':46 'extern':51 'framework':68 'full':67 'ideal':60 'javascript':70 'librari':13 'lifecycl':30 'lightweight':62 'long':20,58 'messag':28,37,42,64 'node.js':15 'option':24 'overhead':69 'pars':43 'poll':21,34,36,59 'process':29 'processor':4,12,73 'provid':19 'queue':3,11,72 'sdk':55 'simpl':45 'sqs':2,10,63,71 'sqs-queue-processor':1 'stabl':17 'start':31 'stop':32 'support':40 'v1.0.0':16 'without':66","created_at":"2026-06-07T13:00:17.100480+00:00","updated_at":"2026-06-07T13:00:17.100480+00:00","problems":[{"fix":"Run 'npm install sqs-queue-processor' and use require('sqs-queue-processor')","cause":"Package not installed or import path incorrect.","error":"Error: Cannot find module 'sqs-queue-processor'"},{"fix":"Use const QueueProcessor = require('sqs-queue-processor');","cause":"Using ES 'import' with this CJS-only package.","error":"TypeError: QueueProcessor is not a constructor"},{"fix":"Provide a valid SQS queue URL: https://sqs.<region>.amazonaws.com/<account-id>/<queue-name>","cause":"Missing queueUrl option or invalid URL format.","error":"The queue url is invalid."}],"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/miskiw/sqs-queue-processor","github":"https://miskiw@github.com/miskiw/sqs-queue-processor","docs":null,"changelog":null,"pypi":null,"npm":"sqs-queue-processor","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}}