Can you explain me, why should I use transform method instead of handle with spring integration if bouth method can return new payload type?
For example
@Bean
public IntegrationFlow integerFlow() {
return f -> f.handle(Integer.class, (p, h) -> p * 2);
}
and
@Bean
public IntegrationFlow integerFlow() {
return f -> f.transform(Integer.class, p -> p * 2);
}
Whey do the same thing. I think so.