Castle.Core.AsyncInterceptor | Library to simplify interception of asynchronous methods | Proxy library
kandi X-RAY | Castle.Core.AsyncInterceptor Summary
kandi X-RAY | Castle.Core.AsyncInterceptor Summary
AsyncInterceptor is an extension to Castle DynamicProxy to simplify the development of interceptors for asynchronous methods.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Castle.Core.AsyncInterceptor
Castle.Core.AsyncInterceptor Key Features
Castle.Core.AsyncInterceptor Examples and Code Snippets
Community Discussions
Trending Discussions on Castle.Core.AsyncInterceptor
QUESTION
For some part of my system I need to add retry logic for reading from the database. I have a number of repositories with async and sync read methods that I can't change. I found a simple solution - interception of all read methods with AsyncInterceptor and add retry read policy with Polly when database exception caught. Polly retries reading with some intervals.
Interceptor code:
...ANSWER
Answered 2019-Mar-19 at 13:58OK, here is my naive implementation of retry:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Castle.Core.AsyncInterceptor
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page