Ich versuche, den Anfangswert meines Reaktors Mono zu speichern und ihn später wiederzuverwenden.
Code: Select all
Mono.just("titi caca")
.flatMap(m -> Mono.just(m).contextWrite(context -> context.put("INITIAL", m)))
.log()
.flatMap(m -> Mono.just(m.toUpperCase()))
.log()
.flatMap(m -> Mono.deferContextual(contextView -> contextView.get("INITIAL")))
.log()
.subscribe();