Skip to content

Commit

Permalink
fix: rethrow exception on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Roiocam committed Sep 14, 2023
1 parent 9cbe433 commit 272e013
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ class JdbcAsyncWriteJournal(config: Config) extends AsyncWriteJournal {
journalDao
.messagesWithBatch(persistenceId, fromSequenceNr, toSequenceNr, journalConfig.daoConfig.replayBatchSize, None)
.take(max)
.collect { case Success(reprAndOrdNr) => reprAndOrdNr }
.runForeach { case (repr, _) =>
recoveryCallback(repr)
.runForeach {
case Success((repr, _)) =>
recoveryCallback(repr)
case Failure(ex) => throw ex
}
.map(_ => ())

Expand Down

0 comments on commit 272e013

Please sign in to comment.