List Camel-Split <MyObj> and process each java object - XML โ€‹โ€‹Config

I cannot split the Java objects that are in the list. How can I tokenize / convert Body into separate Java objects?

<route id="cleanupMigratedFiles" autoStartup="true"> <from uri="timer://kickoff?period=5s" /> <bean ref="migrationProcessor" method="getCacheDeleteObjects" /> <!-- this gives me a List-of-CacheMigr --> <log message="\n\t########\n\tCleanupMigrated file: ${body}" /> <pipeline> <split> <tokenize /> <!-- How to tokenize a List-of-CacheMigr --> <convertBodyTo type="era.oddw.entity.CacheMigr" /> <!-- Do I need this? --> <log message="\n\t########\n\tCleanupMigrated file: ${body}" /> </split> </pipeline> </route> 
+4
source share
1 answer

Found the answer after some more reading. The following tokenized List tag is correct: $ {body}

Thanks to the Camel guys.

  <split streaming="true"> <simple>${body}</simple> <convertBodyTo type="era.oddw.entity.CacheMigr" /> <log message="\n\t########\n\tCleanupMigrated file each: ${body}" /> </split> 
+8
source

Source: https://habr.com/ru/post/1498253/


All Articles