SQS Fixed Polling (throttling) #479
Replies: 4 comments 6 replies
-
I think with the new implementation you could manually start container and stop it 5 seconds later? Perhaps @tomazfernandes has other ideas? |
Beta Was this translation helpful? Give feedback.
-
Hi @jeroenvandevelde, thanks for bringing this up, and thanks @maciejwalkowiak for the ping. Interesting library, I didn't know it. To be honest, I didn't fully understand what's the back pressure strategy it uses - it seems that you can set this 5 second poll, but if all 5 consumer threads finish processing it'll fetch for more messages earlier, did I get it right? We currently have a Does this sound like it would work for your use-case? Getting a bit into the implementation, we have the Considering we already have a lot for this first milestone, I think I'd rather rely on the current approach for now before introducing a new one though. Let me know your thoughts on this. |
Beta Was this translation helpful? Give feedback.
-
Actually, if I understand this library's behavior correctly, we could achieve the same behavior by setting This way if all 5 messages are processed before 5 seconds, the permits will be acquired and the next poll will happen immediately. If e.g. at 5 seconds only 3 messages have been processed, the framework will fetch for 3 messages. Maybe this |
Beta Was this translation helpful? Give feedback.
-
has |
Beta Was this translation helpful? Give feedback.
-
Hi, I checked out the rewrite of SQS that is currently happening. However I couldn't find a way to use SQS in a fixed polling mode as in poll every 5 seconds for 5 messages.
Is this something that is being considered, I am willing to help with this if necessary?
Currently we are using https://github.com/JaidenAshmore/java-dynamic-sqs-listener for this however we are looking at switching to Spring's implementation.
Use Case: We have an application which sends messages over SQS to connectors. We use a fixed polling mechanism to avoid overflowing (throttling) the third parties that sit behind the connectors.
Beta Was this translation helpful? Give feedback.
All reactions