处理 Reactor 中的并行通量

nav*_*ain 6 spring-boot project-reactor spring-webflux

我从 iterable 创建了一个并行通量。在每个可迭代对象上,我都必须进行一次休息调用。但是在执行时,即使任何请求失败,所有剩余的请求也会失败。无论失败或成功,我都希望执行所有请求。

我目前正在使用 Flux.fromIterable 并使用 runOn 运算符

Flux.fromIterable(actions)
.parallel()
.runOn(Schedulars.elastic())
.flatMap(request -> someRemoteCall)     
.sequential()
.subscribe();
Run Code Online (Sandbox Code Playgroud)

我希望执行 iterable 中的所有请求,无论失败或成功。但到目前为止,有些被执行了,有些失败了。

Puc*_*uce 0

onErrorContinue我仍在学习 WebFlux 和 Reactor 的过程中,但尝试直接在(REST 调用)之后之一flatMap来删除(并可能记录)错误。