I have a slightly different approach (due to different requirements):

When the actor in question starts up, I do a check in onRecoveryCompleted. 
If a certain field is empty, it means I have not yet received some 
information from the external system. Then I start a new sequence of 
retries immediately. That is, I do not care how many times, how often, when 
was the last time I tried before my system went down. As my system very 
seldom has to do a restart, it does not matter to me if it means I ask the 
external system some extra times on those rare occasions.

All this stems from the fact that the retry with back-off is not a business 
requirement for me. It is just to be nice to the external system if it has 
troubles, and to make less noise in the logs when the external system is 
restarting etc.

Best regards,

Anders

fredag 16. januar 2015 00.01.07 UTC+1 skrev Jelmer Kuperus følgende:
>
> 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.

Reply via email to