Is the SQS poller buffering messages to maximise throughput? #267
-
|
Hi AWS! We have quite a few queue processors and I'm wanting to migrate them to this framework 😄. I wanted to confirm if it would meet our throughput requirements. A naive way to implement an SQS poller is as follows (similar to the code in this blog):
This has the following downsides:
So we have a pattern using
This avoids the downsides mentioned above. Does this framework use a similar pattern? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @will-molloy. The framework uses different flows and terms but I believe gives the same results your are saying. There is an SQS poller and a message manager that is in charge of keeping track of the messages being processed and possibly extending the message visibility. The manager is also the controller of how many messages can be processed in parallel. The SQS poller is always monitoring the message manager to see if there is any available space for more messages to run as messages complete. Assuming there is it will poll for the number of available messages that manager can handle and then pass them to the manager. We want to avoid reading more messages from SQS then we can currently process forcing messages to wait in memory when possibly another instance of the application could read the messages and process them. So short answer is no it does not read a full batch, wait for the batch to complete and then read another batch. It will read more messages as messages get completed. |
Beta Was this translation helpful? Give feedback.
Hi @will-molloy. The framework uses different flows and terms but I believe gives the same results your are saying. There is an SQS poller and a message manager that is in charge of keeping track of the messages being processed and possibly extending the message visibility. The manager is also the controller of how many messages can be processed in parallel.
The SQS poller is always monitoring the message manager to see if there is any available space for more messages to run as messages complete. Assuming there is it will poll for the number of available messages that manager can handle and then pass them to the manager. We want to avoid reading more messages from SQS then we can current…