hej Konrad, can you please point me to any documentation describing how to 
manually cancel living flow? the official documentation assumes that flows 
are infinite or eventually source will be drained - so no problem. 
I cannot find any section on the topic of cancelling flows subscription.  

On Wednesday, 30 March 2016 10:39:35 UTC+2, paweł kamiński wrote:
>
> 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 connection and then iterate over 
> them after unbind. 
> but I need a hint how to "cancels flows upstream subscription", I can't 
> see any useful method on connection or connection.flow().
>
> and one more thing - until now I thought that creating flow from actor 
> will make such flow child of the actor, so closing actor would close also 
> flow's actors, obviously it is not and flow is keep on consuming incoming 
> messages even though actor is long gone.
>
> On Wednesday, 30 March 2016 00:32:24 UTC+2, Konrad Malawski wrote:
>>
>> 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 have a shutting down section for the low level API, we should add that 
>> - thanks -> https://github.com/akka/akka/issues/20177
>>
>> Would be awesome if you'd perhaps step up and help contributing a 
>> beginning of that docs section :-)
>>
>> Just looking at 
>> http://doc.akka.io/docs/akka/2.4.2/java/http/server-side/low-level-server-side-api.html#starting-and-stopping
>>  
>> I guess I do the right thing. 
>> but I cannot understand a fragment from 
>> http://doc.akka.io/docs/akka/2.4.2/java/http/server-side/low-level-server-side-api.html#Closing_a_connection,
>>  
>> "The HTTP connection will be closed when the handling Flow cancels its 
>> upstream subscription". 
>> Should I manually close connection after unbinding? that would be 
>> strange, I just want to unbind and shutdown, closing all live connections.
>>
>> No, it's not strange for two reasons: a) it's "unbind" which means 
>> "release that port, I won't be accepting anything new on it", and it also 
>> it is b) the behaviour one wants for  it's called graceful shutdown – serve 
>> the people that already sent you requests, and stop accepting new ones, 
>> then shut down.
>>
>> The "shutdown now and drop everything on the floor" can already be 
>> achieved in a rather brutal way – killing the ActorSystem, however the 
>> feature is on our radar however it's a new feature: shutdownNow on github 
>> <https://github.com/akka/akka/issues/20069>.
>>
>>
>> For injecting "external termination" intro streams, we have KillSwitch 
>> prepared which will likely ship with 2.4.3.
>>
>>
>> -- 
>> Cheers,
>> Konrad 'ktoso’ Malawski
>> <http://akka.io>Akka <http://akka.io> @ Lightbend <http://typesafe.com>
>>
>> <http://lightbend.com>
>>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to