Last active
October 7, 2016 19:21
-
-
Save praseodym/b083e9c9e0b83b37a2a38cf97962809e to your computer and use it in GitHub Desktop.
Flux.sample() behaviour in reactor-core 3.0.2.RELEASE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.pivotal.literx; | |
import org.junit.Test; | |
import reactor.core.publisher.Flux; | |
public class Sample { | |
@Test | |
public void sample() { | |
Flux<Integer> flux = Flux.just(1, 2, 3); | |
flux.log().sampleMillis(1000).subscribe(a -> System.out.println("Subscribe: " + a)); | |
System.out.println("Done"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21:21:27.012 [main] DEBUG reactor.util.Loggers$LoggerFactory - Using Slf4j logging framework | |
21:21:27.073 [main] INFO reactor.Flux.Array.1 - | onSubscribe(reactor.core.publisher.FluxArray$ArraySubscription@2b9627bc) | |
21:21:27.076 [main] INFO reactor.Flux.Array.1 - | request(unbounded) | |
21:21:27.076 [main] INFO reactor.Flux.Array.1 - | onNext(1) | |
21:21:27.076 [main] INFO reactor.Flux.Array.1 - | onNext(2) | |
21:21:27.076 [main] INFO reactor.Flux.Array.1 - | onNext(3) | |
21:21:27.077 [main] INFO reactor.Flux.Array.1 - | onComplete() | |
Done | |
Process finished with exit code 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment