Sorry, my onTimer() doesn't fire. It looks like all I need to do is 1. use TimerGraphStageLogic 2. call scheduleOnce 3. override onTimer. I am misusing Resume for retries but I've tried scheduleOnce in other places and it still doesn't fire. Here's an example,
override def createLogic(inheritedAttributes: Attributes): GraphStageLogic = { new TimerGraphStageLogic(shape) { private def decider = inheritedAttributes.get[SupervisionStrategy].map (_.decider). getOrElse(Supervision.stoppingDecider) var retries = 1 var duration = 100 def myHandler(): Unit = { try { if(testException != null) throw testException if(iter.hasNext) { push(out, iter.next()) } } catch { case NonFatal(e) => decider(e) match { case Supervision.Stop => { failStage(e) } case Supervision.Resume => { if(retries > 0) { logger.debug("before scheduleOnce retries {} duration {}", retries, duration) scheduleOnce(None, FiniteDuration(duration, MILLISECONDS)) } else { failStage(e) // too many retries } } } } } setHandler(out, new OutHandler { override def onPull(): Unit = { myHandler() } }) override protected def onTimer(timerKey: Any): Unit = { retries -= 1 duration *= 2 myHandler() } } } -- >>>>>>>>>> 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.