Flux.create和之间有什么区别Flux.generate?我正在寻找 - 理想情况下使用示例用例 - 来了解何时应该使用其中一个.
subscribeOn()规范进行处理,但一切似乎都在main线程上运行。import org.junit.jupiter.api.Test;
import reactor.core.publisher.DirectProcessor;
import reactor.core.publisher.Flux;
import reactor.core.publisher.FluxProcessor;
import reactor.core.publisher.FluxSink;
import reactor.core.scheduler.Schedulers;
/**
* I want to construct my React pipelines during creation,
* then emit events over the lifetime of my services.
*/
public class React1Test
{
/**
* Attempt 1 - use a DirectProcessor and send items to it.
* Doesn't work though - seems to always run on the main thread.
*/
@Test
public …Run Code Online (Sandbox Code Playgroud)