Hi It can be a good idea to look at the unit tests of the components as they often cover how a functionality may be used (if tested) or at least help you in the right direction.
On Sat, Oct 3, 2020 at 12:14 AM Site Register <site.regis...@ymail.com.invalid> wrote: > > Hi All, > According to the document MongoDB :: Apache Camel , it supposes to batch > insert into mongodb. However I found it only inserted the first record of the > batch. I also added a process right before mongodb insert and the message > having a list of the document. Very appreciated if you can help. > Thank you, > > On Thursday, October 1, 2020, 08:22:23 AM EDT, Site Register > <site.regis...@ymail.com.invalid> wrote: > > Hi All, > It tried to batch insert by leveraging aggregate. Somehow it only inserted > one record for each batch. Very appreciated if you can help. > from(fromFile) > .split().tokenize("\n",1) > .aggregate(constant(true), new ArrayListAggregationStrategy()) > .completionSize(1000) > .completionTimeout(500) > > .to("mongodb:mongoBean?database=databaseName&collection=collectionName&operation=insert"); > > Thank you, -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2