You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "james strachan (JIRA)" <ji...@apache.org> on 2014/09/17 14:48:33 UTC

[jira] [Created] (CAMEL-7832) create a java 8 demo of RX to show typesafe filtering and transforming of messages

james strachan created CAMEL-7832:
-------------------------------------

             Summary: create a java 8 demo of RX to show typesafe filtering and transforming of messages
                 Key: CAMEL-7832
                 URL: https://issues.apache.org/jira/browse/CAMEL-7832
             Project: Camel
          Issue Type: New Feature
            Reporter: james strachan
             Fix For: 2.11.5


Camel RX can already do typesafe processing of messages
http://camel.apache.org/rx.html

it'd be nice to show a demo using Java 8 and lambdas. e.g. like this...
{code}
ReactiveCamel rx = new ReactiveCamel(camelContext);
Observable<Order> observable = rx.toObservable("seda:orders", Order.class);
 
// now lets filter and map using Java 8
Observable<String> largeOrderIds = observable.
  filter(order -> order.getAmount() > 100.0).
  map(order -> order.getId());
 
rx.sendTo(observable, "activemq:MyQueue");
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)