Giter VIP home page Giter VIP logo

aws-serverless-sqs-event-source's People

Contributors

dependabot[bot] avatar hyandell avatar jlhood avatar nicklonginow avatar shsaumy avatar ylynn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-serverless-sqs-event-source's Issues

Message Attributes empty

The "messageAttributes" object is empty on incoming events even though my messages all should contain one attribute.

"messages": [
{
"messageId": "a5df8a12-ae1d-4a1d-b352-c8aafbe4dc4b",
"receiptHandle": "AQEBtYpGgK/MU2rTPCMsV8f+glYkIZ+Jbsptce9qPk4+00y9cOwsP33I9zj8+U0OA0jt4UTkhf/4igPE/mOhz37TFCOEGtkEB12sRNgN+bufASfwFGIUQ5tSYJIZ9QduULuO15IDFH0JAVrOIdq8ZSM3BLcV3EiD7VXha2CIg2mXmqkpcJyfcVl6kVN9WjYCWLBto6RGorejeJ9dAsn7AJcYr546oXk4z5z0q79NRq59F4Q3DESsmNYvGqjOOHOs8aJ5OXzKM4EaH7ZZwhsU+lDocNMqMLOPRPY3J34sbK4A4Te1lsOSkGE9T1CnijwZBnO00mUB/7vpvfPrXs+j/2riz7pqf8mT8Ygwblry+KKz7wTUbLt5fFpgAJqm2QUSvIdu2DI+I4b+4b3ro6OMa/G3Nw==",
"mD5OfBody": "2301f613c4160a6cf522a340da376150",
"body": "{<EXAMPLE_BODY>}",
"messageAttributes": {}
},
{
"messageId": "7c5200d2-22be-4d62-a7b1-9ac6aac2218c",
"receiptHandle": "AQEBo1djdqdLSi5Hwzy8lxcYW9C9H/kxc5pfbbLDaQhOPUFARuOlRMaahEqGU6+GrCUYnzO2CEnoIiBm6DHK3LMN7HO2RfRC/iMLjmkFbLLkWKwL2R9IsH3r6t7kiuYWfbYD0fCh0a/Cl/xkwBrE+WCfJCX3Flkl1zR5zZD/EBmnkx20PKu5u6fEGofJNKm17SAqr8IVh6eDyBb9zHig5sUvCWDrByH9jpW3gaxSKLAHJHAEIj1uyHhxGS39SaqJA6LydxsA+xwZwOjX4PYxuMT7yXgmrVm/vWQ//uL7vy1dX/BydNdSqt+4ZKJ71/phHx5TmrKS1RDDJc/enrKOw6EJTcT9ECtDg2DPjEJyspTp2n2UMTvzLbSf4kysxg1znFffnr2OOpqIRpCglE45cixi2Q==",
"mD5OfBody": "7295178dfd60ce94607294d7460fd4b7",
"body": "{<EXAMPLE_BODY>}",
"messageAttributes": {}
}
]

Support higher throughput

Currently, the SQSPoller is invoked by the CW Event schedule and invokes the message processor to process batches of messages synchronously. The current algorithm works and is cost-efficient, but cannot support high throughput. An alternative would be if the SQSPoller and MessageDispatcher classes were put into separate lambda functions and the SQSPoller invoked the MessageDispatcher lambda function asynchronously to process a batch of messages, then continued on. The MessageDispatcher lambda function would handle updating the queue with results of the execution of its batch of messages. This would dramatically increase parallelism of message processing. One caveat is that a high volume queue could lead to too many lambdas being invoked, causing the account to hit its concurrency limit. However, setting a concurrency limit on the MessageProcessor function could be used to control how many concurrent invocations would be supported.

Hitting java.lang.NullPointerException when trying to delete SQS messages

Hello,

I've set everything up and the correct lambda function is being successfully executed.
The SQSPoller logs indicate this success is received. INFO MessageDispatcher:62 - Processed 10 messages in 1399ms. perMessageAverage=139ms

Then it crashes before any messages can be removed from the SQS queue. It gives this stack trace

java.lang.NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
at com.amazonaws.serverless.sqseventsource.MessageDispatcher.dispatch(MessageDispatcher.java:52)
at com.amazonaws.serverless.sqseventsource.SQSPoller.poll(SQSPoller.java:39)
at com.amazonaws.serverless.sqseventsource.lambda.SQSPollerHandler.handleRequest(SQSPollerHandler.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

Any help would be appreciated!

Thanks,
Andrew

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.