Re: [akka-user] Resuming on error from flatMapMerge

2017-06-08 Thread Roland Kuhn
Hi Stephen, wasn’t your requirement to drop the whole sub-list when a failure occurs during its processing? That is not achieved with this design: you’ll have to buffer all events and only release the buffer when the substream completes successfully. Something like

Re: [akka-user] Resuming on error from flatMapMerge

2017-06-08 Thread Stephen Duncan
So, the suggestion is something like this?: val subStreamFuture = Source(Seq(Seq(1, 2), Seq(3, 4, 5), Seq(6))) .flatMapMerge(5, m => Source.single(m) .mapConcat(identity) .via(subFlow) .map(Success(_)) .recover { case t: Throwable => Failure(t) } .collect {

Re: [akka-user] beginner question on akka streams flow design.

2017-06-08 Thread Curt Siffert
Regarding that suggestion, here is a code sample on how you might accomplish the case of a graph stage that registers for updates from an actor: https://github.com/Keenworks/SampleActorStage Curt Siffert On Thursday, June 8, 2017 at 4:27:43 AM UTC-7, Akka Team wrote: > > One way would be

Re: [akka-user] Questions about Cluster Aware Router

2017-06-08 Thread Mainak Ghosh
Hello Patrik, I am trying to explore the tradeoffs of instantiating a new routee when there is overhead of state reconciliation. In my application, routees themselves can be CPU intensive, and as a result distributing the load across multiple machine improves performance (especially when we have

Re: [akka-user] Re: How should I config the use-dispatcher-for-io

2017-06-08 Thread Akka Team
When re-configuring the netty execution context you must make sure that the used execution context has enough threads for netty, in newer versions of Akka you should also see this warning hinting about that: WARNING: Failed to get all worker threads ready within 10 second(s). Make sure to specify

Re: [akka-user] Akka-http connection pool rotating connections (time to live)

2017-06-08 Thread Akka Team
There is no max-time-to-live for a connection, only akka.http.host-connection-pool.idle-timeout but that requires there to be no requests going through the connection for a timeout before it is terminated. I'd expect that when you deploy the new version, the old version get undeployed and those

Re: [akka-user] beginner question on akka streams flow design.

2017-06-08 Thread Akka Team
One way would be mapAsync(1)(elem => ask-actor-and-combine-elem-with-token). If asking for every element is too expensive you could make a custom graph stage which asks the actor on materialisation to get the first token, but then also registers for updates from the actor, that can be done using

Re: [akka-user] No matching constructor found

2017-06-08 Thread Konrad Malawski
Arun, please do not post the same question to 3 different channels when you already were given a response. If you need to re send a question, please at least link back to where you asked already. This was answered in:

Re: [akka-user] Questions about Cluster Aware Router

2017-06-08 Thread Patrik Nordwall
I think resizer is only for local router. Also, I don't understand why adding more actors should improve performance if the bottleneck is outside of these actors. Have you tried by just using the local replicator from each node without any routers. If not, please explain why that is not a good fit

[akka-user] No matching constructor found

2017-06-08 Thread Arun kannan
class FileUploaderActor extends Actor{ override def receive: Receive = { case UploadFile(billerId, filename, subCategory, count, dueDate) => val fileOberverActor = ActorSystem().actorOf(Props[FileObserverActor]) val billerData =