Assuming I've got a header with a property called "count" on it, how do I route based on that value ?
In the Kotlin DSL there is the route function, but I'm unsure how to configure it to be a HeaderValueRouter
The documentation says the following for the Java DSL,but it isn't clear to me how I can get hold of the headers within the router block.
Does anyone have an example (Kotlin and Java DSLs ) ?
Spring Integration natively provides specialized router types, including:
HeaderValueRouter
PayloadTypeRouter
ExceptionTypeRouter
RecipientListRouter
XPathRouter
As with many other DSL IntegrationFlowBuilder EIP methods, the route() method can apply any AbstractMessageRouter implementation or, for convenience, a String as a SpEL expression or a ref-method pair. In addition, you can configure route() with a lambda and use a lambda for a Consumer<RouterSpec>.