From 18b3a3656423581e5f209d20e8b97c7dca5c72b4 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Wed, 26 Nov 2008 01:01:07 +0000 Subject: [PATCH] Added note about ChannelInterceptors' pre/postReceive() methods only applying to PollableChannels --- spring-integration-reference/src/channel.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spring-integration-reference/src/channel.xml b/spring-integration-reference/src/channel.xml index 1ec95f25c8..bc2e24928d 100644 --- a/spring-integration-reference/src/channel.xml +++ b/spring-integration-reference/src/channel.xml @@ -221,6 +221,16 @@ return message; } }]]> + + Keep in mind that receive() calls are only relevant for + PollableChannels. In fact the + SubscribableChannel interface does not even define a + receive() method. The reason for this is that when a Message is sent to a + SubscribableChannel it will be sent directly to one or more subscribers + depending on the type of channel (e.g. a PublishSubscribeChannel sends to all of its subscribers). Therefore, + the preReceive(..) and postReceive(..) interceptor methods + are only invoked when the interceptor is applied to a PollableChannel. +