[jira] [Commented] (CXF-7631) Automatically register rx in server customizations

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CXF-7631) Automatically register rx in server customizations

JIRA jira@apache.org

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

John D. Ament commented on CXF-7631:
------------------------------------

This ticket will only be for project reactor.  As a part of CXF-7642,  I'm splitting the modules and will take care of rxjava there.

> Automatically register rx in server customizations
> --------------------------------------------------
>
>                 Key: CXF-7631
>                 URL: https://issues.apache.org/jira/browse/CXF-7631
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 3.2.2
>            Reporter: John D. Ament
>            Assignee: John D. Ament
>            Priority: Major
>
> Presently to register reactive for server components, you need to add this logic:
>  
> {code:java}
> ReactorInvoker invoker = new ReactorInvoker();
> invoker.setUseStreamingSubscriberIfPossible(false);
> jaxrsServerFactoryBean.setInvoker(invoker);
> StreamingResponseProvider<?> streamProvider = new StreamingResponseProvider<>();
> streamProvider.setProduceMediaTypes(Collections.singletonList("application/json"));
> jaxrsServerFactoryBean.setProvider(streamProvider);{code}
>  
> This ideally should be automated, and auto discovered when deployed to a server.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)