StreamMessageListenerContainer should wait until listeners finish processing within timeout during shutdown#2563
Open
aooohan wants to merge 1 commit intospring-projects:mainfrom
Open
StreamMessageListenerContainer should wait until listeners finish processing within timeout during shutdown#2563aooohan wants to merge 1 commit intospring-projects:mainfrom
StreamMessageListenerContainer should wait until listeners finish processing within timeout during shutdown#2563aooohan wants to merge 1 commit intospring-projects:mainfrom
Conversation
vuhp
reviewed
Sep 4, 2023
src/main/java/org/springframework/data/redis/stream/StreamMessageListenerContainer.java
Show resolved
Hide resolved
mp911de
reviewed
Oct 17, 2023
|
|
||
| subscriptions.forEach(Cancelable::cancel); | ||
|
|
||
| subscriptions.stream() |
Member
There was a problem hiding this comment.
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.
d43adc9 to
a71f042
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix issue: #2261
Set a new option
shutdownTimeoutfor container option. The container will wait listener withshutdownTimeouttime to finish processing.If any improvement can do, feel free to tell me.