How could/should I implement Consumer Rate Limiting for the SQS Consumer #3285
Unanswered
nroach-sfdc
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am wanting to rate limit the speed/throughput of messages being pulled from our SQS queue to alleviate strain on our database. Without going into detail, lets just say increasing the resources for the DB is out of the question as we want to run cost efficiently and our integration gets hit with infrequent but large bursts of request. So I want to create a consumer that does something like: "pull this many messages every minute", instead of as quickly as it can.
My thought was extending the IAmAMessageConsumer and adding something like a thread delay or a wait period in the Receive method, but I wanted to make sure there wasn't anything I was overlooking. Thoughts on something like this?
Beta Was this translation helpful? Give feedback.
All reactions