Hello,
Here's a solution but you will need to know the maximum duplicates possible in your file, and also have a field to correctly order the records and concatenate your message in the right order.

- Load your file
- Fork to two transitions
- in first transition, add a deduplication based on the Header1

- Join the two transitions in an enrichment activity wih the deduplication transition as the main set in an N card link


- In the additional data tab add your new collection link and configure its parameters as follow

Here I suppose that I may have as many as 5 duplicates max.
In the data tab, I add the header2 corresponding to the Message:
In the Sort tab, I order by the rowID (supposedly) to have the message in the correct order.

- Last step is to add another enrichment to concatenate the 5 duplicates ordered by rowID

Here's what my file looks like:

And final result in my workflow :

Hope this is clear enough.