Perhaps I'm misunderstanding the use of durable mailboxes. Here's what I'm trying to accomplish:
We have a long-running background process on one of our servers (Play Framework) which fetches data from a URL and eventually persists it in Elasticsearch based on other events in the system. Essentially, it's a side-effect of other requests. We have a Manager actor which creates a Worker actor for each requests. Right now we're using a TimerBasedThrottler in front of the Manager as a weak form of rate limiting (we don't need strict rate limiting, we just have thousands of requests hitting at once and want to limit the performance hit to the rest of the system). Because it can take so long for a single message to get to the front of the queue, we want to persist the mailbox in front of the throttler. Potentially this mailbox could have tens of thousands of messages. We aren't concerned about losing any specific message, we just want to be able to recover *most* messages if we have to restart the server (which happens fairly often as we deploy new code). We also aren't worried about losing in-progress messages if the JVM crashes. My thought was that durable mailboxes would give us an easy way to persist this queue, allowing the system to recover the queue when restarted without introducing an external queue or storage layer. I've got a file-based durable mailbox set up on the throttler and I can see that messages are being persisted to the file system correctly. What I don't understand is how recovery works. Perhaps it's just me but I felt the documentation sort of danced around this point. Do durable mailboxes have built-in recovery on restart? Or is that something I need to write? If I need to write it, is it just a matter of deserializing the file? I couldn't find anything in the API and the tests in akka-durable-mailboxes are a bit thin and I couldn't find any guidance there either. Should I create my own implementation of a file-based durable mailbox which enqueues messages in the file on startup? How would I know which messages have already been processed? Have I completely misunderstood durable mailboxes? Thanks -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>>>>>>>> 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/groups/opt_out.
