The Flux.just method

This is the simplest method for Flux generation. It takes a set of values, such as var-args, and generates a finite Flux stream with them. Each of the values specified as var-args forms a value event of the Flux. A completion event is published after publishing all of the specified values:

Flux.just("Red");Flux.just("Red", "Blue", "Yellow", "Black");Flux.just(new Person("Rahul"), new Person("Rudra"));

Get Hands-On Reactive Programming with Reactor now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.