Hi @marc.dipasquale
That might be cleaner however, I think i’ve a way to create the service activator programatically using IntegrationFlows which i think solves the problem, having not had experience of the spring java DSL until now.
@Bean public IntegrationFlow errorFlow (@Value ("${channelName}, ErrorHandler errorHandler) String channel {
return IntegrationFlows.from(channelName).handle(ErrorMessage.class, (error, headers) → {
errorHandler.handle(error)
return null;
}).get();
}