RSocket |
Request : Response |
Input Type |
Output Tpye |
Request & Response |
1:1 |
Mono<T> |
Mono<R> |
Fire & Forget |
1:0 |
Mono<T> |
Mono<Void> |
Request Stream |
1:N |
Mono<T> |
Flux<R> |
Request Channel |
M:N |
Flux<T> |
Flux<R> |
Routing
@MessageMapping("create.user")
public Mono<User> createUser(Mono<User> usermono){
return this.userService.create(usermono);
}
@MessageMapping("update,user")
public Mono<User> updateUser(Mono<User> usermono){
return this.userService.update(usermono);
}
RSocketRequester W/O Data
rSocketRequester.route("product.all")
//.data()
.retrieveFlux(Product.class);