问题
In routeBuilder class it is having many routes, after completion of all routes need to call testMethod() but currently testMethod() method is calling many times
.onCompletion().bean(TestProcessor.class,"testMethod").end()
//Router Class
from(Source).setHeader("message",
body()).onCompletion().bean(TestProcessor.class,"testMethod").end().
choice().when(header("camelfilenameonly").contains("test1.csv"))
.unmarshal().bindy(BindyType.Csv,Test1CsvDto.class).bean(TestProcessor.class,
"processTest1Object").stop()
.otherwise().choice()
.when(header("camelfilenameonly").contains("test2.csv"))
//Unmarshal csv
.unmarshal().bindy(BindyType.Csv, Test2CsvDto.class).bean(TestProcessor.class,
"processTest2").stop()
any help would be appreciated..
来源:https://stackoverflow.com/questions/46237756/oncompletion-in-apache-camel-is-called-more-than-once