Created
February 9, 2014 19:49
-
-
Save searler/8904954 to your computer and use it in GitHub Desktop.
RxJava I/O using camel stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CamelBlocking { | |
public static void main(String[] args) throws InterruptedException { | |
CamelContext camelContext = new DefaultCamelContext(); | |
ReactiveCamel rx = new ReactiveCamel(camelContext); | |
Observable<String> observable = rx.toObservable( | |
"stream:in?scanStream=true", String.class); | |
observable.toBlockingObservable().forEach(new Action1<String>() { | |
@Override | |
public void call(String m) { | |
System.err.println(m); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment