Hi Johan, Thank you very much for your suggestions. The supervisor strategy has options of stop/resume/escalate/restart, I didn't figure out how to resend the failed message via supervisor strategy. The sender is in sending and forgot mode and no confirmation for sender since it's batch process, so the send option will not apply. I will try the third option.
Thanks again, Yan On Wednesday, July 27, 2016 at 9:24:51 AM UTC-5, Akka Team wrote: > > Hi Yan, > > I'd recommend you to try to start out with some messaging pattern instead > of reaching for special mailboxes. > > Did you try just catching the exception and retrying your logic rather > than relying on supervision for this? > A second option would be to have the sender retry sending the message > after a timeout. A third option would > be to provide a parent actor that outside actors interact with who > contains the retry logic (which messages are in > flight and what child is processing what message, how many retries for a > specific message) and lets the children > just fail without caring about the retry logic. > > -- > Johan > > On Mon, Jul 25, 2016 at 8:52 PM, Yan Pei <[email protected] <javascript:>> > wrote: > >> Hello All, >> >> I am trying to use PeekMailBox for retrying after the message >> processing failed. >> In the Actor, I am using Future to delivery the message for processing >> and piping the result back to itself. Do some matching(Failure or something >> else) after that. >> Where am I supposed to put PeekMailboxExtension.lookup().ack(context)? >> I couldn't put inside the future or before after future or matching section. >> >> Thanks for helping! >> Yan >> >> -- >> >>>>>>>>>> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > -- >>>>>>>>>> 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.
