camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Burgazzoli (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-9682) camel-rx module should extend Bean Binding to support methods returning Observable<T>
Date Fri, 10 Feb 2017 11:32:41 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-9682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Luca Burgazzoli updated CAMEL-9682:
-----------------------------------
    Summary: camel-rx module should extend Bean Binding to support methods returning Observable<T>
 (was: camel-rxjava module should extend Bean Binding to support methods returning Observable<T>)

> camel-rx module should extend Bean Binding to support methods returning Observable<T>
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-9682
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9682
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-rx
>            Reporter: james strachan
>             Fix For: 2.19.0
>
>
> when making asynchronous InOut requests it'd be nice if methods could return Observable<T>
so that we could use the RxJava async programming model to process async requests & responses.
> e.g. kinda like how folks can use Retrofit for HTTP: http://joluet.github.io/blog/2014/07/07/rxjava-retrofit/
> {code}
> public interface MyThing {
> @GET("/session.json")
> Observable<LoginResponse> login();
> @GET("/user.json")
> Observable<UserState> getUserState();
> }
> {code}
> to then let you use the normal composition / join / flatMap stuff in RxJava to compose
multiple requests across different microservice invocations together with timeouts etc e.g.
to compose the latest from 2 calls:
> {code}
> Observable.combineLatest(api.fetchUserProfile(), api.getUserState(),
> (user, userStatus) -> new Pair<>(user, userStatus));
> {code}
> Where we'd replace the @GET annotation with a bean binding annotation and a URI parameter
to switch to using ActiveMQ or Twitter or whatever



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message