Is it possible to get the first element from flux without converting flux into stream?
Alternatively to take(1)
, if you need a Mono<T>
that represents the first element of the Flux<T>
you can use .next()
.
Or if you need the i-th element, use .elementAt(i)
(must be sure that such an element exists though, unlike take
and next
which just return an empty publisher if not enough elements).