For a given stream of data:
Flux<Integer> evenFlux = Flux.just(1, 2, 3, 4, 5, 6, 7)
.filter(i -> i % 2 == 0)
Flux<Integer> oddFlux = Flux.just(1, 2, 3, 4, 5, 6, 7)
.filter(i -> i % 2 != 0)
Instead of this how can I split using a single pipeline?
All filtered elements to one Flux and discarded elements to another Flux. Using onDiscardHook or something?
Note: I need to do a repeat() operation on the new Flux. Was not able to perform repeat on GroupedFlux.