Spring Integration & Retry: Do I need a separate retry bean for each service-activator?

后端 未结 2 1325
甜味超标
甜味超标 2021-01-16 19:58

I\'ve got a spring integration pipeline and I\'ve got a number of different service activators that I want to enable retry for.

I want to use the same retry policy (

相关标签:
2条回答
  • 2021-01-16 20:30

    I had to implement Retry mechanism in my project as well and I created my own implementation.

    Retry using AOP

    This works like a charm.

    You can just annotate your methods with the @Retry annotation, provide some config you want and its done.

    0 讨论(0)
  • 2021-01-16 20:47

    You go right way: the RequestHandlerRetryAdvice is thread-safe, so you can use the same beand from several places.

    0 讨论(0)
提交回复
热议问题