Hi, What I currently do in my application when it comes to persisting timers, is to persist a "serializable" version of the Cancellable you receive when you schedule a task. Then upon recovery you will be able to recreate your scheduled task. But keep in mind that if you cancel your scheduled task due to successful contact with third party system, then you also need to persist the "serialized" version of the cancel event. The term "serialized" used here is not literally, but a wrapper object containing enough information to recreate a scheduled task or to cancel it. You will also need to consider what to do with the scheduled duration upon recovery, since system downtime may have exceeded your original timer. The handling of that situation is subject to your business requirements.
On Friday, January 16, 2015 at 12:01:07 AM UTC+1, Jelmer Kuperus wrote: > > Hi. > > I am working on something that processes messages from a kafka topic using > akka-camel > > When i receive a message i attempt to contact a third party system when > this system is unavailable i'd like to retry in 10 minutes, 20 minutes, etc > up to 5 times. I guess I could accomplish this easily by > using context.system.scheduler.scheduleOnce but id the system reboots 5 > minutes after a message failed to process then i would loose the retry. > Additionally I am not entirely comfortable with piling up all retry > messages in memory (potentially I could exhaust all of the available memory) > > So I am looking for a solution that addresses both of these issues. Can > anyone offer any guidance ? > > --jelmer > > -- >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
