A lightweight Node.js library for consuming AWS SQS messages. It processes messages by passing them to a user-defined handler function and deletes them upon successful completion. The library also supports a deleteOnError option to preserve messages on failure and an optional logger. Version 1.2.1 is current; it has a stable API but limited updates. Key differentiators: minimal abstraction, direct SQS integration, and a simple callback-based interface.
npm install queue-processorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require the module, configure AWS credentials and SQS queue URL, define a message handler, and start processing messages.
Ensure all required config fields are provided, including accessKeyId, secretAccessKey, region, and queueUrl.
Set deleteOnError: true in config if you want to delete messages even on processing errors.
Use alternative libraries like sqs-consumer if you need batch processing or more advanced features.
Replace 'import queueProcessor from "queue-processor"' with 'const queueProcessor = require("queue-processor")'.Ensure config.queueUrl is set correctly and matches the SQS queue URL.
Check that accessKeyId, secretAccessKey, and region are correctly set in the config object.