简体   繁体   中英

process records sequentially in Mule batch

I have around 20k records coming from Stage1 table in DB. In a batch step I am trying to migrate these records to STG2 table. The problem I am facing is the order in which the records are getting inserted is changing. Maintaining the sequence is important . Any suggestions ?

默认情况下,它可能是16个线程并行工作,默认的批处理大小是100。请尝试每个线程而不是批处理,它应该可以解决您的问题。

Do you need to interate through the list and insert records one by one?

If Yes, then use foreach or collection splitter, it will process records in sequence.

If you want to insert records as a batch, then directly use a database connector and check bulk mode and insert the records.

After 3.8, Mule allows you to configure the block size in the batch job properties tab. If you request fewer than batch size records, then your processing becomes sequential.

Reference: https://docs.mulesoft.com/mule-user-guide/v/3.8/batch-processing

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM