GH-3618: Support CommonErrorHandler for suspend functions#4254
Conversation
artembilan
left a comment
There was a problem hiding this comment.
Please, add your name to the @author list of all the affected classes.
Thank you!
70e614a to
8e48178
Compare
|
@artembilan I've updated the PR based on your guidance. Please review when you have time! Changes
Regarding #4333: this PR addresses the same root cause. |
Fixes spring-projectsGH-3618(spring-projects#3618) * Setup async failure callback when CommonErrorHandler is explicitly configured * Add test for suspend function with CommonErrorHandler Signed-off-by: zoo-code <kyj20908@naver.com>
Signed-off-by: zoo-code <kyj20908@naver.com>
Fixes spring-projectsGH-3618 (spring-projects#3618) * Set up async failure callback on RecordMessagingMessageListenerAdapter using generic delegation extraction via DelegatingMessageListener * Add suspend function with CommonErrorHandler test in EnableKafkaKotlinCoroutinesTests * Fix ObservationTests (obs6/obs7) with no-retry error handler Signed-off-by: zoo-code <kyj20908@naver.com>
artembilan
left a comment
There was a problem hiding this comment.
Just one concern to see if we can make code better.
Thanks
…atching Signed-off-by: zoo-code <kyj20908@naver.com>
Signed-off-by: zoo-code <kyj20908@naver.com>
artembilan
left a comment
There was a problem hiding this comment.
Sounds good!
Thank you for investigation and confirmation that I am wrong.
Merging...
|
thank you for contribution; looking forward for more! |
|
Sorry, closed too early. Thanks again! |
|
@artembilan Thank you so much! |
|
@zooo-code I want to echo what Artem said above. This is a long awaited feature we wanted to support. Thank you for your contribution implementing it. Much appreciated! |
|
@sobychacko Thank you so much for your kind words! |
Fixes GH-3618(#3618)
Summary
Support
CommonErrorHandler(e.g.,DefaultErrorHandler) for Kotlin suspend functions.Previously, exceptions from suspend functions were only logged and not propagated to
CommonErrorHandler. This change sets up the async failure callback forRecordMessagingMessageListenerAdapterwhenCommonErrorHandleris explicitly configured.Changes
CommonErrorHandleris explicitly configuredCommonErrorHandlerinEnableKafkaKotlinCoroutinesTests.ktRelated
Thanks!!
Please let me know if any changes are needed. I'm happy to address any feedback promptly.