I'm using spring router to decide which of 2 channels to go through. I wan't to pass to the service that gives back an answer one of the values in the payload and not the payload itself. How can I do that? I didn't really find a use case like this, I thought maybe it could be done by using enricher. Any suggestions?
My code :
<int:router id="aggregationRouter"
input-channel="aggregationPathRouterInputChannel"
ref="decideAggregationByName"
>
<int:mapping value="true" channel="SumAggregatorChannel" />
<int:mapping value="false" channel="AvgAggregatorChannel"/>
</int:router>
the decideAggregationByName gets an input which is a string (name) and returns a boolean. I don't know how to pass the string argument that is a member inside the payload I get in this step