=str #22917 recoverWithRetries allow 0 and negative values

This commit is contained in:
Konrad `ktoso` Malawski 2017-06-13 18:18:46 +09:00 committed by Johan Andrén
parent ee79a3d1a8
commit b7d7316c1c
9 changed files with 51 additions and 16 deletions

View file

@ -725,7 +725,9 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source
* RecoverWithRetries allows to switch to alternative Source on flow failure. It will stay in effect after
* a failure has been recovered up to `attempts` number of times so that each time there is a failure
* it is fed into the `pf` and a new Source may be materialized. Note that if you pass in 0, this won't
* attempt to recover at all. Passing in a negative number will behave exactly the same as `recoverWith`.
* attempt to recover at all.
*
* A negative `attempts` number is interpreted as "infinite", which results in the exact same behavior as `recoverWith`.
*
* Since the underlying failure signal onError arrives out-of-band, it might jump over existing elements.
* This stage can recover the failure signal, but not the skipped elements, which will be dropped.