Last active
November 21, 2016 22:11
-
-
Save olbpetersson/be4b2396baef0fa9def137a94d28de11 to your computer and use it in GitHub Desktop.
Trying out Streams in lagom
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
@Override | |
public ServiceCall<Source<String, ?>, Source<String, NotUsed>> test() { | |
Logger.info("Got something streamed"); | |
return inputStream -> { | |
inputStream.runForeach(input -> { | |
Logger.info("Got {} streamed", input); | |
ref.ask(new MyCommand()); | |
}, materializer); | |
return CompletableFuture.completedFuture(pubSubRef.subscriber()); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment