Re: [akka-user] [Akka Stream] Waiting for stream completion

2016-02-09 Thread Viktor Klang
If the Sink doesn't report when it is done, how would you know it's done? On Tue, Feb 9, 2016 at 6:11 AM, hbf wrote: > Hey Akka Stream'ers, > > Is there a simple way to await the completion of stream? > > If I have a source that is not yet connected, I can pipe it throw a >

Re: [akka-user] Auto Restart actor when cluster node fails

2016-02-09 Thread Konrad Malawski
Sounds like you're asking about:  http://doc.akka.io/docs/akka/2.4.1/scala/cluster-sharding.html#Remembering_Entities Have you seen that feature? :) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 9 February 2016 at 16:01:06, Paul Cleary (pclear...@gmail.com) wrote: I am using Cluster

Re: [akka-user] Re: Akka Persistent Actor Lifecycle

2016-02-09 Thread Patrik Nordwall
You can use receive timeout (see actor section in documentation) and then stop it after inactivity. If you use Cluster Sharding you should combine that with the Passivate message as mentioned by Paul (see cluster sharding section in documentation). /Patrik tis 9 feb. 2016 kl. 16:01 skrev Paul

[akka-user] Auto Restart actor when cluster node fails

2016-02-09 Thread Paul Cleary
I am using Cluster Sharding to manage certain actors. Is it possible that, when a node dies and the shards are re-distributed to other nodes in the cluster, to have the actor automatically start up? -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ:

[akka-user] Re: Akka Persistent Actor Lifecycle

2016-02-09 Thread Paul Cleary
You can use Passivate, which will persist I believe after some period of unuse On Tuesday, February 9, 2016 at 9:57:05 AM UTC-5, Mahmoud Atef wrote: > > Hi, > > I'm new to AKKA world and I'm working on implementing EventSourcing using > the PersistentActors, but I got confused about the

Re: [akka-user] Re: websockets with akka-http *java*

2016-02-09 Thread ash.ta
hey johan, thanks for explanation. my main problem is that i don't know scala and the example is pretty much gibberish for me. can you give me a hint about the flow point where sink and source can be called with actorref creation? i mean, your java example shows handleWebsocketMessages()

Re: [akka-user] Re: websockets with akka-http *java*

2016-02-09 Thread Johan Andrén
The Java graph DSL isn’t that different, the squiggly arrows (~>) corresponds to builder.via and you might need to manually perform some more builder.add calls to add stages than the Scala code does, but you should be able to create something pretty much like it with Java. The docs on the Java

[akka-user] Akka Http Websocket

2016-02-09 Thread Matthieu Ravey
Hi, I have an issue with akka http and websocket. I'm using connection.handleWithAsyncHandler and my websocket connection is closed just after being opened. I've posted the issue on stackoverflow with code snippets: http://stackoverflow.com/questions/35274125/websocket-with-async-handler

Re: [akka-user] Akka Http Websocket

2016-02-09 Thread Endre Varga
Hi Mattieu, Which version are you using? -Endre On Tue, Feb 9, 2016 at 4:34 PM, Matthieu Ravey wrote: > Hi, > > I have an issue with akka http and websocket. I'm > using connection.handleWithAsyncHandler and my websocket connection is > closed just after being opened. >

Re: [akka-user] Auto Restart actor when cluster node fails

2016-02-09 Thread Paul Cleary
Dude, yes, thanks! On Tuesday, February 9, 2016 at 10:14:03 AM UTC-5, Konrad Malawski wrote: > > Sounds like you're asking about: > http://doc.akka.io/docs/akka/2.4.1/scala/cluster-sharding.html#Remembering_Entities > Have you seen that feature? :) > > -- > Cheers, > Konrad 'ktoso’ Malawski >

[akka-user] testing database connection error when using akka persistence

2016-02-09 Thread Tim Pigden
Hi I have the following scenario: Program is running using postgres async akka persistence. My database becomes disconnected (server is turned off or otherwise unavailable) Various things fail. My database is turned back on Program stops failing So far so good - the program seems to recover

Re: [akka-user] Auto Restart actor when cluster node fails

2016-02-09 Thread Paul Cleary
How do I get an Entity to "stop" to force a restart? Does the Cluster Shard use the default supervisor strategy? On Tuesday, February 9, 2016 at 10:14:03 AM UTC-5, Konrad Malawski wrote: > > Sounds like you're asking about: >

[akka-user] Akka streams file compression

2016-02-09 Thread Richard Rodseth
I'm writing to files and reading from them using FileIO.fromFile and toFile. Looking to add compression of the files. This looks promising: https://github.com/maciej/snappy-flows The compression is expressed as a Flow[ByteString,ByteString,Unit] Are there other examples or documentation I

[akka-user] [akka-http] Is it possible to map (rewrite on the server) a HttpRequest and call a bound Route recursively?

2016-02-09 Thread jarl
I have been trying to do that but it seems that I only get Rejected result back. Should it work or is there something inside the routing mechanism that makes recursive calls impossible? It looks something like this: val route = ... ~ path("path") { post { // rewrite