ali-essam / wtsqs Goto Github PK
View Code? Open in Web Editor NEWSimplified Node AWS SQS Worker Wrapper
Home Page: https://www.npmjs.com/package/wtsqs
License: MIT License
Simplified Node AWS SQS Worker Wrapper
Home Page: https://www.npmjs.com/package/wtsqs
License: MIT License
Hi Ali
when we have maxConcurrency > 1
i noticed that the worker process jobs with the same group id concurrently
but to process them in order they need be processed sequentially instead
i think that happen because when the worker receive multiple messages as a batch
the code uses promise.all
to process all without considering messages with the same group id
{ MissingParameter: The request must contain the parameter SendMessageBatchRequestEntry.1.Id.
at Request.extractError
....
message: 'The request must contain the parameter SendMessageBatchRequestEntry.1.Id.',
code: 'MissingParameter',
time: 2019-06-19T09:58:56.933Z,
requestId: 'XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX,
statusCode: 400,
retryable: false,
retryDelay: 8.720774804845522 }
Utility function that facilitates routing different jobs to different handlers.
For example
const handler = new JobRouter({
key: 'type',
handlers: {
'type_1': handler1Foo,
'type_2': handler2Foo,
},
defaultHandler: defaultHandlerFoo
})
WTSQS should not fail if accessKeyId and secretAccessKey were not supplied as other authentication methods could be in place
When fetching a message from SQS, visibilityTimeout
(Duration (in seconds) that the received messages are hidden from subsequent retrieve requests.) is determined at request time
In some cases, the timeout might not be clear during the request and the processing job might need more time to process the message. Currently, if the visibilityTimeout
is less than the job processing time, that will cause the message to be back in the queue and visible to other workers to fetch again, causing double processing of the same message.
It's possible through SQS API to extend the timeout after fetching the message through ChangeMessageVisibility.
TODO: Implement this functionality in WTSQS.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.