Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-04-03 Thread paweł kamiński
yeah, I ve just seen it was released. thanks guys - just in time ;] On Friday, 1 April 2016 11:48:39 UTC+2, drewhk wrote: > > Or wait until 2.4.3 and use the KillSwitch feature, as it was mentioned > before: > > 1. unbind server > 2. wait until grace period, then trigger KillSwitch.shutdown or

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-04-01 Thread Endre Varga
Or wait until 2.4.3 and use the KillSwitch feature, as it was mentioned before: 1. unbind server 2. wait until grace period, then trigger KillSwitch.shutdown or abort 3. shut down ActorSystem -Endre On Fri, Apr 1, 2016 at 11:33 AM, Viktor Klang wrote: > Call 'shutdown'

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-04-01 Thread Viktor Klang
Call 'shutdown' on the ActorSystem? Or only the Materializer? On Fri, Apr 1, 2016 at 11:29 AM, paweł kamiński wrote: > I want to clean state of the app, so I could > > 1) terminate akka-system which would also terminate http-server and start > it all over again. > OR > 2) I

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-04-01 Thread paweł kamiński
I want to clean state of the app, so I could 1) terminate akka-system which would also terminate http-server and start it all over again. OR 2) I thought about shutting down just http-server in reaction to some fault state of actors hierarchy. Konrad's comment states that it is not enough

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-04-01 Thread Viktor Klang
When you say "cancel" do you mean "abrupt termination" or something with a code path attached to it? On Thu, Mar 31, 2016 at 11:53 PM, paweł kamiński wrote: > dont take it personally, there is a lot to process and sometimes it is > easy to overlook the most important part, I

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-31 Thread Konrad Malawski
In 2.4.2 you can do the same in a GraphStage (read up on custom stream processing – cancel() and friends). --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 31 March 2016 at 23:38:30, paweł kamiński (kami...@gmail.com) wrote: hej Konrad, can you please point me to any documentation

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-31 Thread Konrad Malawski
Please read my replies, makes me feel very lonely if they're ignored :-)  I mentioned that the feature you need here will be in 2.4.3, which we're planning to release any day now (likely tomorrow). > For injecting "external termination" intro streams, we have KillSwitch > prepared which will

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-30 Thread paweł kamiński
I thought bold is new black, coming back with a bang... ok, your explanation makes kind of sense ;] all I expected was a shutdown method with timeout. and yeah a section with examples would be nice and I can write one once I understand how it works ;] I understand that I need to hold each

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-29 Thread Konrad Malawski
Helloł, I notice that after unbind I cannot create new connection (ie. from a browser) but old, alive connection can still send requests. Am I missing something? Please no bold to highlight question, it looks scary :-) That's exactly how it works, by design. I did notice however that we do not

[akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-29 Thread paweł kamiński
hi, I have a simple http service that binds to a given port and starts accepting IncomingConnection. the server is created by actor on its preStart callback and stopped on postStop. everything works fine until I try to kill the actor and force http-server to stop. public void start() {