I am integrating with one of the external vendor with spring-ip integration. I would like intercept the messages (much like web filters) to print to log file them before and after the transformation for logging and debugging purpose. As the message to log will be customized as I don't want to print all the elements in the message and would like to customize in the interceptor. I tried with wiretap
but didn't help much. Any advice?
@Bean
public IntegrationFlow flow() {
return f -> f.channel("inputChannel")
//Before : logging interceptor before message convert to byte[]
.transform(new OutboundMessageTransformer())
.handle(tcpOutputGateway())
.transform(new InboundMessageTransformer());
//After : logging interceptor after message byte[] is being
parsed
}