TaskWrapper: Configurable callback if exception thrown! #1658
stefanofago73
started this conversation in
Ideas
Replies: 1 comment 4 replies
-
|
Can you give me a little more detail about the issue you're describing? What listeners are you talking about? What gets stuck? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Listeners must be non-blocking and safe!
Before version 1.0.8, if something like this is passed as a listener:
(item, value)->{ throw new RuntimeException("Boom!"); }
There's no other solution than creating a new session, because the callbacks (CompletableFuture) weren't completing.
In version 1.0.8, callback invocations were introduced, but the "stuck-effect" is still present.
(Lines 276-278 and 310-313)
Perhaps it would be more effective to let the Client to decide what to do in the case of an unhandled exception.
This is also for debugging purposes or to develop a retry policy before deciding to actually block processing due to an unrecoverable situation.
This could be achieved with changes to the Task element and the handling of the TaskWrapper. Logically imply some "restrictions and guardrails"
Could it work?
Beta Was this translation helpful? Give feedback.
All reactions