Ok, I see on the Akka Gitter (https://gitter.im/akka/akka) a message by 
@drewhk which seems to confirm that we have to use materialized value to be 
notified of a stream completion, but it's to us to return something as a 
materialized value which can notify us.

On September 12, 2016 3:44 PM, @drewhk wrote:
"to be notified once everything is "done" [...] streams itself cannot 
solve. You need support from the Sinks themselves to give you a signal 
(usually in the form of a materialized value) that they are done"

My stream is an AMQP stream which never complete (it enriches messages), 
but it can fails so ATM I return a Future as a materialized value from my 
sink and on future failure, I terminate the actor system (because I want my 
service to fails to let other supervisor services handle this failure).

He also wrote that "this is the topic of one of the upcoming blog posts", 
so I will see what is considered a good solution :)

Le vendredi 9 septembre 2016 17:50:24 UTC+2, Victor a écrit :
>
> Hi,
>
> How can I terminate the ActorSystem running my stream when the stream 
> fails?
>
> If I have the following stream:
>
> A -> B -> C
>
> and B fails with a stoppingStrategy, what happens exactly? A and C actors 
> are still running? How can I catch such stopping to then terminate the 
> ActorSystem?
>
> I think I have to use materialized value but it's not clear because if 
> it's the solution I would have to return a Future as a materialized value 
> from each of my stages to then listen on failures. It seems heavy :)
>
> Thank in advance,
> Victor
>

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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