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

Remove the shutdown event from the queue before executing the shudown… #642

Merged
merged 2 commits into from
Nov 1, 2019

Conversation

ychunxue
Copy link
Contributor

@ychunxue ychunxue commented Nov 1, 2019

Description of changes:

Remove the shutdown event from the recordsDeliveryQueue to avoid non-empty queue in the new subscription.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.


private void handleShutdownEvent(SubscriptionShutdownEvent shutdownEvent, BlockingQueue<RecordsRetrievedContext> recordsDeliveryQueue) {
//Removing the Shutdown Event from the queue before executing the Shutdown action.
recordsDeliveryQueue.poll();
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add this to the ShutdownEvent runnable, rather than having a new method here.

Copy link
Contributor

@ashwing ashwing left a comment

Choose a reason for hiding this comment

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

lgtm

@ychunxue ychunxue merged commit 047493a into awslabs:master Nov 1, 2019
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.

2 participants