This commit is contained in:
Brian Clozel 2017-09-06 11:52:05 +02:00
parent 7388b4b768
commit 1cf7c32a1e
1 changed files with 4 additions and 2 deletions

View File

@ -93,8 +93,10 @@ public class CompositeReactiveHealthIndicator implements ReactiveHealthIndicator
@Override
public Mono<Health> health() {
return Flux.fromIterable(this.indicators.entrySet())
.flatMap((entry) -> Mono.just(entry.getKey())
.zipWith(entry.getValue().health().compose(this.timeoutCompose)))
.flatMap((entry) -> Mono.zip(
Mono.just(entry.getKey()),
entry.getValue().health().compose(this.timeoutCompose))
)
.collectMap(Tuple2::getT1, Tuple2::getT2)
.map(this.healthAggregator::aggregate);
}