Say i have two Flux as follows:
Flux<Integer> f1 = Flux.just(10,20,30,40);
Flux<Integer> f2 = Flux.just(100,200,300,400);
Now what i want is to combine these flux into a single Flux or a Tuple of both the Flux, which will be having the elements of both the Flux in a single Flux.
I tried the following using the zipwith method:
Flux<Integer, Integer> zipped = f1.zipWith(f2,
(one, two) -> one + "," +two)
.subscribe();
But this is giving a compile time error:
Incorrect number of arguments for type Flux<T>; it cannot be parameterized with arguments <Integer, Integer>
How can i achieve this? Please suggest.