Header values set after splitter, are not coming post aggregation using spring integration dsl

123 views Asked by At

I am using Spring integration dsl for the below requirement.

The requirement is that, I have to split a message using splitter and add a header value to the messages post splitting during some transformation and do the aggregation later on. But post aggregation, the header value I added post splitter to the message is lost. Is this due to aggregation policy. I am using default policy.

Please suggest a way how to persist the header and use it post aggregation. So that I can do some custom transformation.

1

There are 1 answers

0
Rakesh Sajjan On

I have solved this by aggregating the whole messages instead of just aggregating the message payloads which helped in getting all the individual message headers and the message payloads and accordingly used in the aggregator in building the final response.