Skip to content

Commit

Permalink
merge substreams before executing bulkWrite
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Mar 10, 2022
1 parent c707120 commit 1c66d98
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public Flow<SubSource<AbstractWriteModel, NotUsed>, WriteResultAndErrors, NotUse
return Flow.<SubSource<AbstractWriteModel, NotUsed>>create()
.flatMapConcat(source -> source.grouped(maxBulkSize)
.flatMapConcat(searchUpdateMapper::processWriteModels)
.flatMapMerge(parallelism, writeModels -> executeBulkWrite(shouldAcknowledge, writeModels))
.mergeSubstreamsWithParallelism(maxBulkSize)
.flatMapMerge(parallelism, writeModels -> executeBulkWrite(shouldAcknowledge, writeModels))
.async(MongoSearchUpdaterFlow.DISPATCHER_NAME, parallelism)
);
}
Expand Down

0 comments on commit 1c66d98

Please sign in to comment.