Reactive Java
Flux.range
Emit a finite range of integers respecting demand. Source-reviewed Reactor or WebFlux example, NOT RUN.
Formal Syntax & Structure
java syntaxjava
Flux.range(1, 3)Working Example
Example Snippetjava
package lab;import java.time.Duration;import org.junit.jupiter.api.Test;import reactor.core.publisher.Flux;import reactor.test.StepVerifier;class DemandTest { @Test void demand() { StepVerifier.create(Flux.range(1, 3), 0) .expectSubscription().thenRequest(2).expectNext(1, 2) .thenRequest(1).expectNext(3).expectComplete() .verify(Duration.ofSeconds(2)); }}