feat: Timeout to detect runaway async consumer effects#1150
Draft
johanandren wants to merge 2 commits intomainfrom
Draft
feat: Timeout to detect runaway async consumer effects#1150johanandren wants to merge 2 commits intomainfrom
johanandren wants to merge 2 commits intomainfrom
Conversation
Contributor
Author
|
Should create fewer timers like in lightbend/kalix-jvm-sdk#2383 |
patriknw
reviewed
Nov 17, 2025
| .flatMap { effect => | ||
| timeoutCancellable.cancel() | ||
| toSpiEffect(message, effect) | ||
| } |
Contributor
There was a problem hiding this comment.
or shall we have it in the runtime instead?
Contributor
Author
There was a problem hiding this comment.
Rationale for doing it here is that we can do it only for async requests (expecting that such accidents do not happen for normal/blocking vt logic). In runtime we don't know if it was async or not. But maybe we actually want it for both cases.
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.
Not as likely to be used here as in Kalix, but still good as a safeguard to detect a returned async consumer effect where the CompletionStage never completes. If the timeout is hit an error is logged and the event will be retried rather than holding up the consumer stream indefinitely.