[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16253461#comment-16253461
 ] 

Sergey Beryozkin commented on CXF-7535:
---------------------------------------

John, re Flux vs Mono in ReactorInvoker. 
There's no diff in the way it's implemented at the moment. FYI, once you do 
asyncRespone.resume(), it will take the object whatever it is and will try to 
return it and the async response will be done. So, if you have Flux returning 
not a self-contained object and instead a sequence of objects coming in with 
the Flux async subscriber events, then it won't really work.
 
The same issue was in the RxJava2 invoker but I've just updated it to make it 
work for a case where a sequence of objects to be serialized as JSON is 
returned, have a look please, I propose the same be done for Reactor Flux case.

One more thing: asyncResponse.complete() is supposed to be called by the CXF 
runtime only when it detects that the response data have been sent to the 
client, thus you can safely remove asyncResponse::onComplete()

> Support for Project Reactor as rx()
> -----------------------------------
>
>                 Key: CXF-7535
>                 URL: https://issues.apache.org/jira/browse/CXF-7535
>             Project: CXF
>          Issue Type: New Feature
>          Components: JAX-RS
>    Affects Versions: 3.2.0
>            Reporter: John D. Ament
>            Assignee: John D. Ament
>             Fix For: 3.2.2
>
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to