Announcement Announcement Module
Collapse
No announcement yet.
Channel interceptor for synchronous reply channels Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Channel interceptor for synchronous reply channels

    Hello,

    is there any way to configure channel interceptors for the responses of a synchronous call? Currently we are calling them manually but it would be great if it were possible to configure the interceptors in xml.

    Thank you,
    Dimo

  • #2
    Can you describe what you mean (or show some code) when you say, you are "calling them manually"?

    Comment


    • #3
      Hi Mark,

      this is how I would configure a channel interceptor in XML:
      --cut--
      <int:channel id="aChannel">
      <int:interceptors>
      <bean class="org.springframework.integration.transformer .MessageTransformingChannelInterceptor">
      <constructor-arg ref="anUnmarshallingTransformer" />
      </bean>
      </int:interceptors>
      </int:channel>
      --cut--
      Unfortunately, I can not find similar way to configure an interceptor for the temporary response channel.
      By manually I mean we have implemented a service activator which forwards the messages to the actual channel and invokes a list of configured interceptors after receiving the response:
      --cut--
      Message<?> response = messageChannelTemplate.sendAndReceive(request, actualChannel);
      // invoke interceptors on the response
      --cut--
      Is there any way to configure the interceptors as in the first snippet?

      Best regards,
      Dimo

      Comment

      Working...
      X