Use Akka Streams instead of Akka Actors #55
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me, but you might also want to get a review from someone who knows this app and streams a bit better. :)
test/controllers/FunctionalTest.java
Outdated
.hasMessageContaining("Invalid Status Code 403"); | ||
String serverURL = "ws://localhost:37117/ws"; | ||
WebSocketClient.LoggingListener listener = new WebSocketClient.LoggingListener(message -> { | ||
// System.out.println(message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. BTW, I lost the ability to merge PRs on the examples somewhere down the line (github status altered?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check up on your Github status for the examples. If you like you can email me if there's anything you think you should have access to that you don't and I'll sort it out. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wsargent, I've now given you (and the rest of the Core team in Github) Write access to all example repos. Let me know how you get on next time you try to merge.
Will, I'm getting the following error if I close the browser tab:
We should "fail" more gracefully here, I think. |
From
that is the backpressure timeout -- I removed it. |
This PR moves the reactive stocks example to use streams instead of actors as the underlying mechanic. The underlying code is the same as the Scala version, only with some tweaks necessitated by Jackson's serialization.
One thing that was surprising is that the websocket client ignores the value set for "Origin" and instead sends the same value as serverURL. It fails because it's on a different port rather than because it's checking the header and finding a difference.
Fixes #46
Supersedes #51
Compare with playframework/play-scala-websocket-example#74 (scala version of websocket example)