a contract for asynchronous stream processing with non-blocking back pressure handling • De-facto standard for the behaviour of reactive libraries and for interoperability • Co-designed by Netflix, Lightbend, Pivotal, RedHat, Kaazing, Twitter, and many others • Implemented by RxJava 2, Reactor, Akka Stream …
interfaces are included in the upcoming Java 9 in java.util.concurrent: • Flow.Publisher • Flow.Subscriber • Flow.Subscription • Flow.Processor As a standalone JAR with org.reactivestreams package: • Publisher • Subscriber • Subscription • Processor
Natively designed on top of Reactive Streams • Lightweight API with 2 types: Mono and Flux • Native Java 8 support and optimisations • Single 1 Mbytes JAR • Focus on performance • Reactive foundation of Spring Framework 5
Streams Publishers • Carefully designed after writing thousands of Reactor and Spring reactive tests StepVerifier StepVerifier.create(flux) .expectNext("foo", "bar") .expectComplete() .verify();
and Flux • StepVerifier • Transform: map() + flatMap() • Merge • Request and Back pressure handling • Error handling • Convert & adapt: RxJava 2, List • Reactive to blocking and other way around
Streams interfaces yourself (or do it "for fun") 2. Reactive Streams by itself is not enough 3. Nothing happens until something subscribes to the Publisher