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

fix: stop poller when input is being shutdown #65

Merged

Conversation

yaauie
Copy link
Contributor

@yaauie yaauie commented Feb 25, 2022

:stop_polling
If you throw :stop_polling from the #before_request callback, then the poller will exit normally before making the next long poll request.
-- Aws::SQS::QueuePoller#before_request

Fixes: #33
Closes: #40

@yaauie
Copy link
Contributor Author

yaauie commented Feb 25, 2022

Unfortunately, the existing specs mock too much and this makes no difference to them. But in practice, this should prevent an internal loop of QueuePoller#poll that is receiving zero messages from continuing to poll.

Copy link
Contributor

@kares kares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

tested this locally with AWS and was able to confirm the shutdown stalling no longer ended up in an infinite shutdown loop ... shutdown is stalled only till the next poll kicks in 👍

@JPLachance
Copy link

Hello! Do we have an ETA for the merge and release of this fix? It fix issues in our environments. Thank you!

@kares kares merged commit 5d7aaec into logstash-plugins:main Mar 17, 2022
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.

Plugin won't shutdown if no events coming through the SQS queue
3 participants