Re: [akka-user] Delay a gracefully shutdown when application shutdown hook has been detected

2018-02-13 Thread Patrik Nordwall
I think you can do that with Akka’s Coordinated Shutdown https://doc.akka.io/docs/akka/current/actors.html#coordinated-shutdown Register your task to one of the phases, instead of using jvm shutdown hook. Coordinated Shutdown will be triggered by jvm exit. /Patrik tis 13 feb. 2018 kl. 12:52

Re: [akka-user] Akka Persistence and avoiding var in favor of context.become

2018-02-13 Thread Christopher Hunt
> On 13 Feb 2018, at 20:50, Christopher Hunt wrote: > > While receiveRecover is executing though, I presume that I’m going to have to > store the current state in a var…? Here’s what I’ve started with: > override def receiveRecover: Receive = { > case e: Event =>

Re: [akka-user] Akka typed - first impressions

2018-02-13 Thread 'Michal Borowiecki' via Akka User List
Hi Patrik, Thanks for the latest snapshot. I've been trying to play around with akka typed by migrating the project I'm working on and previously I'd been stuck at implementing stashing. Now with the StashBuffer it got simple. Overall I'm really happy. It took a lot of time but I managed to

Re: [akka-user] Source.queue with java sample

2018-02-13 Thread Konrad “ktoso” Malawski
If you’re talking about doing akka streams / reactive streams over the network (seems you imply that by mentioning ‘on other system’), then the queue is not going to give you what you want. That pattern is however trivial with a new feature that we’re about to release in the upcoming release of

Re: [akka-user] Source.queue with java sample

2018-02-13 Thread 薛永飞
many thanks ! But I think I hadn't described clearly. what I mean is that ,I want to receive the source from akka remote(which is located in another system) app1 send data to app2 which is a akka stream system On Tuesday, 13 February 2018 20:55:37 UTC+8, Konrad Malawski wrote: > > Browse

Re: [akka-user] Source.queue with java sample

2018-02-13 Thread Konrad “ktoso” Malawski
Browse the docs :-) https://doc.akka.io/japi/akka/current/akka/stream/javadsl/Source.html#queue-int-akka.stream.OverflowStrategy- -- Cheers, Konrad 'ktoso ' Malawski Akka @ Lightbend On February 13, 2018 at 13:48:41, 薛永飞

[akka-user] Source.queue with java sample

2018-02-13 Thread 薛永飞
I cannot find a Source.queue with java sample,does anyone has? please! -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the archives:

[akka-user] Delay a gracefully shutdown when application shutdown hook has been detected

2018-02-13 Thread Kilic Ali-Firat
Hi, I'm working on a part of my Akka application which must gracefully shutdown when a shutdown hook has been detected. The use case of my question is in case of deployment while the application is making some tasks. In this specific case, we do want to delay the deployment until my actors

[akka-user] Re: AKKA - JAVA

2018-02-13 Thread Kilic Ali-Firat
Hi, You can find many examples in java reading following page : https://developer.lightbend.com/guides/ Le mardi 13 février 2018 11:09:36 UTC+1, S SATHISH BABU a écrit : > > Hello, I am new to Akka. I want to learn to develop Distributed programs. > I searched for tutorials but couldn't find

[akka-user] AKKA - JAVA

2018-02-13 Thread S SATHISH BABU
Hello, I am new to Akka. I want to learn to develop Distributed programs. I searched for tutorials but couldn't find anything proper. The Akka documentation is too dry and theoretical. Where can I find Akka implementation in Java tutorials?! -- >> Read the docs:

Re: [akka-user] Akka Persistence and avoiding var in favor of context.become

2018-02-13 Thread Christopher Hunt
> On 13 Feb 2018, at 8:26 pm, Patrik Nordwall wrote: > > You have to do the right become transitions in the replay of the events, and > when consuming snapshots. Especially the latter is very easy to get wrong. > Thanks Patrik, that shouldn’t be an issue for my use

Re: [akka-user] Akka Persistence and avoiding var in favor of context.become

2018-02-13 Thread Patrik Nordwall
You have to do the right become transitions in the replay of the events, and when consuming snapshots. Especially the latter is very easy to get wrong. On Tue, Feb 13, 2018 at 10:23 AM, Christopher Hunt wrote: > On Friday, 15 September 2017 16:41:42 UTC+10, Konrad Malawski

Re: [akka-user] Akka Persistence and avoiding var in favor of context.become

2018-02-13 Thread Christopher Hunt
On Friday, 15 September 2017 16:41:42 UTC+10, Konrad Malawski wrote: > > I would recommend avoiding become with PersistentActors in general, it > gets very complex. > The Akka doc (1) suggests that the use of become should be fine. Are you able to expand on the complexity statement above? I'd

Re: [akka-user] Message processed by Actors

2018-02-13 Thread Kilic Ali-Firat
Hi, I will make some tests with Stash trait, it can be a good solution in my use case. Thanking for sharing your idea :) Le lundi 12 février 2018 19:13:53 UTC+1, Justin du coeur a écrit : > > On Mon, Feb 12, 2018 at 11:26 AM, Kilic Ali-Firat > wrote: > >> Hi Akka

Re: [akka-user] Slow reactive-kafka consumer when running multiple streams

2018-02-13 Thread Kilic Ali-Firat
Hi, I did a lot of tried and in my case, the bottleneckness was the akka-streams-kafka version. It was not aligned to my kafka server version. You have a look also to field "receive.buffer.bytes" parameter, make some tests with differents values. You also can have a look to your CPUs