Hey Patrick, 

I will give a try to the Streams restart stage, in my use case, it seems 
more appropriate than wrapping streams in one actor. 

Le mardi 5 décembre 2017 15:14:41 UTC+1, Patrik Nordwall a écrit :
>
> The BackoffSupervisor will create the child StreamWrapperActor. You have 
> to start the supervisorProps with actorOf.
>
> It's probably easier to use the Streams restart stage
>
> https://doc.akka.io/docs/akka/current/stream/stream-error.html?language=scala#delayed-restarts-with-a-backoff-stage
>
> The reactive-kafka documentation should be updated to use that, and I 
> think that was discussed in some ticket.
>
> On Tue, Dec 5, 2017 at 2:45 PM, Kilic Ali-Firat <kilic.a...@gmail.com 
> <javascript:>> wrote:
>
>> Hi Akka,
>>
>> Something is unclear for me in code founded in reactive-kafka 
>> documentation. Below we are creating the supervisor using BackOff.onStop 
>> function. 
>>
>> We are using the child props but we didn't create an actor using props. 
>> Do we need to create StreamWrapperActor with system.actorOf or the 
>> BackOffSupervisor will create the child ?
>>
>> import akka.pattern.{Backoff, BackoffSupervisor}
>> val childProps = Props(classOf[StreamWrapperActor])
>> val supervisorProps = BackoffSupervisor.props(
>>   Backoff.onStop(
>>     childProps,
>>     childName = "streamActor",
>>     minBackoff = 3.seconds,
>>     maxBackoff = 30.seconds,
>>     randomFactor = 0.2
>>   ))val supervisor = system.actorOf(supervisorProps, name = 
>> "streamActorSupervisor")
>>
>> -- 
>> >>>>>>>>>> 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+...@googlegroups.com <javascript:>.
>> To post to this group, send email to akka...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> Patrik Nordwall
> Akka Tech Lead
> Lightbend <http://www.lightbend.com/> -  Reactive apps on the JVM
> Twitter: @patriknw
>
>

-- 
>>>>>>>>>>      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