Skip to content

Commit

Permalink
feat(webflux): Ensure batch processing execution sequence.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang committed Nov 17, 2024
1 parent 1beb04a commit 016ee96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ResendStateEventHandler(
fun handle(afterId: String, limit: Int): Mono<BatchResult> {
val target = CompensationTarget(function = RESEND_FUNCTION)
return snapshotRepository.scanAggregateId(aggregateMetadata.namedAggregate, afterId, limit)
.flatMap { aggregateId ->
.concatMap { aggregateId ->
stateEventCompensator.resend(
aggregateId = aggregateId,
target = target,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class BatchRegenerateSnapshotHandlerFunction(
namedAggregate = aggregateMetadata.namedAggregate,
afterId = afterId,
limit = limit,
).flatMap { aggregateId ->
).concatMap { aggregateId ->
handler.handle(aggregateId).thenReturn(aggregateId)
}.toBatchResult(afterId).toServerResponse(request, exceptionHandler)
}
Expand Down

0 comments on commit 016ee96

Please sign in to comment.