viernes, 4 de marzo de 2022

Flight to the Flux (Project Reactor)

 Flight to the Flux (Project Reactor)



Simon Baslé, Flight to the Flux; A Look at Reactor Execution Model

https://www.youtube.com/watch?v=sNgTTcG-fEU&ab_channel=SpringDeveloper



Commits

- Nothing happens till subscribe
- flux.subscribe() then things happen
- flux.subscribe(e -> System.out.println(e)) print element in flux
- two flux getting the same stream data
- two flux getting the samw stream data using atomicInteger
- ConnectableFlux connect to flux-publish(), then the second subscribe is empty
- delaying flux1 to let flux2 get some elements
- delaying flux1 to let flux2 get some elements, add thread.sleep(5000) to see the effect
- before publishOn(Scheduler) to see the normal flux of data
- the main flow shows the element and the final result runs on another thread of the elastic schedulre
- the main flow... thread of the elastic scheduler, showing the thread name
- introducing intermediate operations with doOnNext(...)
- if eliminate publishOn(Schedule) the process is executed in only one thread
- subscribeOn() sends a signal of update but works on the same respectie thread
- StepVerifier with virtualTime for Test
- Create, Update README.md

eot

No hay comentarios:

Publicar un comentario