I have a spring integration flow.
It reads the file. The file can belong to the consumer.Once I find the consumer I want to add that CONSUMER to the header so later on I can use e.g. In error handling I can check that did I even get the consumer
looking at the header.
IntegrationsFlows.from(directorySource)
.transform(new ConsumerFinderTransformer()
.enrichHeaders(h -> h.header("CONSUMER" ,payload)
How do I get the payload in the enrichHeaders
that's returned by the ConsumerFinderTransformer
here.
I cannot find a way. Any help will be appreacited