deduplicate-sqs-messages
v1.0.0
Published
Library for deduplicated sqs message base on messageId
Downloads
49
Readme
Deduplicate-sqs-messages
Javascript library for deduplicated sqs message base on messageId.
Installation
Use the package manager npm to install
npm install deduplicate-sqs-messages
Usage
import { consumeMessage } from "deduplicate-sqs-messages";
const messageId = "623163c1-f70d-5fcd-a442-346d2829e06e"; // id from sqs message
const tableName = "TestTable"; // name of dyanmodb table
const lamdbaTimeOut = 30; //timeout of your lambda function
consumeMessage(
messageId,
() => {
console.log("Calling my function!");
},
tableName,
lamdbaTimeOut
);
Test
npm run test
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.