-
Notifications
You must be signed in to change notification settings - Fork 334
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
Allow consumers stopped with abort: true to be restarted #429
Allow consumers stopped with abort: true to be restarted #429
Conversation
CLA Assistant Lite bot CLA CHECK All Contributors have signed the CLA |
I have read the CLA Document and I hereby sign the CLA |
recheck |
Thanks for the PR, it's appreciated, I'll take a look at this by Monday. |
Code Climate has analyzed commit 3926fb6 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (80% is the threshold). This pull request will bring the total coverage in the repository to 96.9% (0.0% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems about right to me.
Released as v7.4.0-canary.0, we'll be testing that version and then release it as 7.4.0 once we're happy with the changes. |
Resolves #389
Description:
This bug was originally closed, but I've been running into a related issue. Basically we want to start and stop a consumer based on a feature flag while using the
abort
option on.stop
. The singletonAbortController
makes it impossible to restart an aborted consumer, even if the consumer is recreated. This results in the abort signal persisting and being sent into any following AWS SDK calls.This PR creates a new
AbortController
each time the consumer is started, which results in a fresh abort signal and allows the consumer to restart. I've also removed the previouscontroller.ts
file as it's no longer used.I've also added an associated test that fails without these changes that demonstrates how the abort signal is being passed to the AWS SDK
.send
method. Thanks!Type of change:
Why is this change required?:
A simple explanation of what the problem is and how this PR solves it
Code changes:
Checklist: