When to use CompletableFuture and project reactor?

Viewed 27

Just began to explore Project reactor but got couple of question regarding reactor and CompletableFuture :
1] When to use CompletableFuture and Project Reactor
2] In CompletableFuture we define thread poll so how the thread management works for reactor?
3] How to write following code using reactor where I want to execute method 1 and method2 in parallel and pass the result of both methods to method3

public void parallerExec(){
   String a = method1();
   String b = method2();
   method3(a, b);
}

Thanks in advance.

0 Answers
Related