Re: [akka-user] [akka-stream] How to provide flow with 'last seen element' backup?

2017-08-07 Thread Alexey Shuksto
Hi, Johan, Thanks for your reply, but would not `Sink.last` complete it's Future only after Source fully completed? I need to check for last passed value in-between: ``` val bh = Source.unfold(0)(v => Some((v+1, v))).delay(1.minute).runWith(BroadcastHub.sink) bh.runWith(Sink.ignore) ``` So,

[akka-user] Restarting Akka Actor with a new State

2017-08-07 Thread Joe San
I have a scenario where I have to restart a child Actor from within a parent actor. The restart should happen with the following rules: 1. The start should happen only after stop has been completed 2. Both the stop and start should happen asynchronously I now have the following

Re: [akka-user] Akka event bus with typed actor Ask Question

2017-08-07 Thread Patrik Nordwall
I don't think that is implemented yet. See https://github.com/akka/akka/issues/21219 Adapters might be a possible workaround. /Patrik On Fri, Aug 4, 2017 at 10:05 AM, Politrons wrote: > I´m looking in google without

Re: [akka-user] [akka-stream] How to provide flow with 'last seen element' backup?

2017-08-07 Thread Akka Team
You can achieve this by using Sink.last which will materialize into a Future[T] that completes with the last element emitted. It does however not complete the promise with the last element on failures, this can be remedied by prepending it with a .recoverWithRetries(0, { case _ => Source.empty

[akka-user] Akka Stream Tcp Messaging Server POC

2017-08-07 Thread G J
I'm new Akka stream, I have to build on poc on Akka stream for instant messaging. So I need a help to understand what I'm missing here. import java.net.InetSocketAddress; import java.util.concurrent.CompletionStage; import akka.Done; import akka.actor.ActorRef; import akka.actor.Props; import

Re: [akka-user] Does Akka directive "fileUpload" copies the entire input entity file into memory?

2017-08-07 Thread Akka Team
Hi, You are putting the entire file into memory by running byteSource.runFold(ByteString.empty) { case (acc, i) => acc ++ i }.map(s => s.utf8String) This means the body is first completely read into memory as a ByteString and then transformed into a String. To stream the byte chunks directly

[akka-user] Akka Stream Messaging Server Poc

2017-08-07 Thread G J
I'm getting termination message just after sucuss message when my neety client connected. I'm new in akka stream. Please help me what i'm missing in my poc. import java.net.InetSocketAddress; import java.util.concurrent.CompletionStage; import akka.Done; import akka.actor.ActorRef; import

Re: [akka-user] Re: How to deal with Future in a customized Sink?

2017-08-07 Thread Akka Team
Using the async is how it should be done, you should never use Await or call the internal methods of the GraphStageLogic from another thread as you do in your sample code. Create the async callback in the onPush method though, not inside the future onComplete callback. You can let the callback

Re: [akka-user] Akka-HTTP: How does backpressure work with Futures and execution contexts?

2017-08-07 Thread Akka Team
Each connection is a stream of Request => Response, having a slow Future inside that stream will backpressure so the same client cannot push another request through that connection. The Akka HTTP server by default limits the number of concurrent connections to 1024 (you can set it using

[akka-user] Akka , Jdbc Connectivity

2017-08-07 Thread Kiran Sarma
I want to do programs on akka jdbc using java . can anyone send any links or code i am beginner to akka -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the

[akka-user] Re: [Akka-typed] Mutable Behavior testing with EffectfulActorContext

2017-08-07 Thread Nishant Vishwakarma
Hi Konrad, Thanks for the reply. Meanwhile I am trying to use StubbedActorContext to achieve the desired results. I am not getting a stackoverflow error and I am successfully getting number of children and their inboxes. However there are no messages. One of the child actor sends itself a