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 <[email protected]> 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 [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. > -- 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 [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.
