Skip to content

Instantly share code, notes, and snippets.

@vinsguru
Created October 25, 2020 16:49
Show Gist options
  • Save vinsguru/86e4d6121577ed3fc2087dc17a4a5d11 to your computer and use it in GitHub Desktop.
Save vinsguru/86e4d6121577ed3fc2087dc17a4a5d11 to your computer and use it in GitHub Desktop.
Flux<Integer> integerFlux = Flux.create((FluxSink<Integer> fluxSink) -> {
IntStream.range(0, 5)
.peek(i -> System.out.println("going to emit - " + i))
.forEach(fluxSink::next);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment