Search code examples
spring-integrationspring-integration-dsl

How to resolve the handler and the method dynamically from the headers?


My flow is like this

private IntegrationFlow myChannel() {
    return f -> f
            ...
            .handle("myHandler", "myMethod")
            ...
}

How to resolve the handler myHandler and the method myMethod dynamically from the headers?


Solution

  • Add a .router() with subflows for each header value.