Flux#range() method can be used to emit a sequence of incrementing integers:
public static Flux<Integer> range(int start, int count)
Where start is the first integer to be emitted and count is the total number of incrementing values to emit, including the first value.
package com.logicbig.example; import reactor.core.publisher.Flux; public class FluxRangeExamples { public static void main(String[] args) { System.out.println("-- Flux#range example --"); Flux.range(1,5) .subscribe(System.out::println); } }
-- Flux#range example --12345
Dependencies and Technologies Used: