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

StreamMessageListenerContainer should wait until listeners finish processing within timeout during shutdown #2563

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

Conversation

aooohan
Copy link

@aooohan aooohan commented Apr 20, 2023

Fix issue: #2261

Set a new option shutdownTimeout for container option. The container will wait listener with shutdownTimeout time to finish processing.

If any improvement can do, feel free to tell me.

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).


subscriptions.forEach(Cancelable::cancel);

subscriptions.stream()
Copy link
Member

Choose a reason for hiding this comment

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

Running a busy-spin cannot be interrupted. Also, keeping common ForkJoin pool threads busy asks for trouble.

Instead, our Tasks should report a completion future that we can listen to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending-design-work Needs design work before any code can be developed type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants