spring-reactor

transform vs transformDeferred

旧城冷巷雨未停 提交于 2021-02-08 10:11:10
问题 What is the difference between transform & transformDeferred in project reactor flux. Good example will be helpful. https://projectreactor.io/docs/core/release/reference/index.html#advanced-mutualizing-operator-usage 回答1: Most of the time, a Flux is "lazy": you declare a processing pipeline, but data only starts flowing once you subscribe to it. You can subscribe multiple times. This is called a cold Flux (and each time you subscribe to a cold source, the source generates its data anew for

transform vs transformDeferred

主宰稳场 提交于 2021-02-08 10:10:41
问题 What is the difference between transform & transformDeferred in project reactor flux. Good example will be helpful. https://projectreactor.io/docs/core/release/reference/index.html#advanced-mutualizing-operator-usage 回答1: Most of the time, a Flux is "lazy": you declare a processing pipeline, but data only starts flowing once you subscribe to it. You can subscribe multiple times. This is called a cold Flux (and each time you subscribe to a cold source, the source generates its data anew for

Mono/Flux published on ExecutorService does not terminate as expected

血红的双手。 提交于 2019-12-11 14:07:24
问题 I tested a little around with the proposal in this thread: flux within executorservice and i have simplified the example a little to understand it easier. So, heres the example: ExecutorService executorService = Executors.newSingleThreadExecutor(); Flux.just("1", "2", "3").subscribeOn(Schedulers.fromExecutorService(executorService)).doOnNext(System.out::println).subscribe(); try { executorService.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { // TODO Auto-generated