Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

awssub: remove message from queue in non concurrent way #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

muharem
Copy link
Contributor

@muharem muharem commented Mar 24, 2020

After a message is handled by a client, the message is being removed via subscriberMessage.Done() method. The method sends to a channel a request to remove the message from a queue and that request will be handled by another goroutine in some indefinite time. The channel in our case is not buffered which blocks all callers of Done method till the previous request is handled.
This in high load slows down the message handling a lot in a case if the messages are being handled concurrently.

In this PR I suggest to simplify the current solution, and instead of queuing up a request to remove a message, remove it synchronously by sending a request to sqs.

The current changes is backward compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant