INT-4064: Simplify IdempotentReInt Java Config
JIRA: https://jira.spring.io/browse/INT-4064 We configure `IdempotentReceiver` via `<int:idempotent-receiver>` component or `@IdempotentReceiver` annotation. In case of regular Java config, e.g. direct `ConsumerEndpointFactoryBean` usage or Java DSL, it isn't possible to configure `idempotentReceiverInterceptor` enough easy * Introduce `if...else` logic into `ConsumerEndpointFactoryBean` to proxy `MessageHandler`, if `adviceChain` contains an newly-introduced `HandleMessageAdvice`. And do that independently if `MessageHandler` is `AbstractReplyProducingMessageHandler` * Make `idempotentReceiverInterceptor extends HandleMessageAdvice` * Skip `HandleMessageAdvice` in the `AbstractReplyProducingMessageHandler` * Add advice applying logic into the `AbstractMethodAnnotationPostProcessor` as well Introduce `HandleMessageAdvice` marker interceptor to cover the case when an `Advice` can be advices as well. Remove unused `setAdviceChainIfPresent()` method in the `AbstractMethodAnnotationPostProcessor` Document `HandleMessageAdvice` Increase wait latch timeouts in the `LockRegistryLeaderInitiatorTests` Doc Polishing
This commit is contained in:
committed by
Gary Russell
parent
f74ddc2aa6
commit
d9f9f9e3ca
@@ -232,8 +232,7 @@ public class IdempotentReceiverIntegrationTests {
|
||||
|
||||
@Bean
|
||||
@org.springframework.integration.annotation.Transformer(inputChannel = "input",
|
||||
outputChannel = "output", adviceChain = "fooAdvice")
|
||||
@IdempotentReceiver("idempotentReceiverInterceptor")
|
||||
outputChannel = "output", adviceChain = {"fooAdvice", "idempotentReceiverInterceptor"})
|
||||
public Transformer transformer() {
|
||||
return new Transformer() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user