From 0245e7713639e2fffd5e717774f21986c26aa9d1 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Wed, 27 Dec 2017 17:05:29 -0500 Subject: [PATCH] Docs example for DSL IdempotentReceiver --- src/reference/asciidoc/handler-advice.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/reference/asciidoc/handler-advice.adoc b/src/reference/asciidoc/handler-advice.adoc index 7015b802af..0ce95d3a25 100644 --- a/src/reference/asciidoc/handler-advice.adoc +++ b/src/reference/asciidoc/handler-advice.adoc @@ -816,5 +816,18 @@ public MessageHandler myService() { } ---- +And with the Java DSL, the interceptor is added to the endpoint's advice chain: + +[source, java] +---- +@Bean +public IntegrationFlow flow() { + ... + .handle("someBean", "someMethod", + e -> e.advice(idempotentReceiverInterceptor()) + ... +} +---- + NOTE: The `IdempotentReceiverInterceptor` is designed only for the `MessageHandler.handleMessage(Message)` method and starting with _version 4.3.1_ it implements `HandleMessageAdvice`, with the `AbstractHandleMessageAdvice` as a base class, for better dissociation. See <> for more information.