Commit 7f330e2
authored
* GH-10345: Migrate to Spring Core Retry
Fixes: #10345
* Remove `spring-retry` dependency since all its usage have been replaced with Spring Core Retry and some custom internal implementations
* Rework the `RequestHandlerRetryAdvice` to be based on the Spring Core Retry:
- accept only `RetryPolicy` and use `RetryTemplate` internally just for stateless behavior
- Expose `stateKeyFunction`, `newMessagePredicate` and `stateCacheSize` for stateful behavior.
- Since there is no any stateful utility in Spring Core, implement its algorithm internally in the `RequestHandlerRetryAdvice`
* Remove `RetryStateGenerator` and `SpelExpressionRetryStateGenerator` since they are based on `RetryState` from Spring Retry.
And now they are replaced by the mentioned functions above as options on the `RequestHandlerRetryAdvice`
* Rework `RetryAdviceParser` according to a new state of the `RequestHandlerRetryAdvice`.
In addition, expose an `exponential-back-off/jitter` XML attribute
* Fix `ErrorMessageStrategy` Javadoc to point to a general `AttributeAccessor` interface from Spring Core
* Remove `ErrorMessageSendingRecoverer.RetryExceptionNotAvailableException`
and the logic around it since this is not a case anymore with a new `RequestHandlerRetryAdvice` logic
* Rework failing tests according to the new API and logic of the target classes
* Document breaking change in the `whats-new.adoc`
* Rework `retry` section in the `handler-advice/classes.adoc` to reflect new reality for the `RequestHandlerRetryAdvice`
* Rework the configuration samples in the `retry` section to Java
* Fix typos and language in the docs and Javadocs
* Use a proper `retryStateKey` for cache entry removal on successful retry execution
1 parent b2810cd commit 7f330e2
File tree
17 files changed
+442
-722
lines changed- spring-integration-core/src
- main
- java/org/springframework/integration
- config/xml
- handler/advice
- support
- resources/org/springframework/integration/config
- test/java/org/springframework/integration
- config/xml
- dsl/flows
- handler/advice
- src/reference/antora/modules/ROOT/pages
- handler-advice
17 files changed
+442
-722
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
| |||
485 | 484 | | |
486 | 485 | | |
487 | 486 | | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | 487 | | |
492 | 488 | | |
493 | 489 | | |
| |||
Lines changed: 31 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 29 | | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | | - | |
50 | 56 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | 92 | | |
Lines changed: 0 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
28 | | - | |
29 | | - | |
30 | 26 | | |
31 | | - | |
32 | 27 | | |
33 | 28 | | |
34 | 29 | | |
| |||
85 | 80 | | |
86 | 81 | | |
87 | 82 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | 83 | | |
0 commit comments