Yes... the default in akka is at-most-once due to the performance hit that is inevitable with guaranteed delivery. To guarantee delivery you must have message persistence, but there are a number of ways to achieve this. We built a financial system with akka and used a few different tools for guaranteed delivery where it was needed.
1. usually with the entry-point into akka we used a message queue (rabbitmq in our case)... so for example if a user uploaded an income file that went into a queue first, then akka consumed from the queue 2. along with the above we used supervision to ensure the work was actually done... in our case we tended to prefer making this guarantee at more "macro" levels rather than micro because the processing was idempotent.... so rather than guarantee all 10 million income lines were processed we would prefer to guarantee the file as a whole was processed. with supervision strategies deeper in the actor hierarchy we could guarantee that an entire process completed successfully... in general we didn't optimize for the failure path. so if a failure occurred we didn't try to only reprocess the specific line(s) that failed but would just retry from the beginning. this made the normal flow much simpler to reason about and much quicker - your mileage may vary 3. I lied a bit above... we did have several checkpoints throughout where we would use persistence at a more granular level to guarantee delivery - mostly with a persisted actor and command sourcing or AtLeastOnceDelivery Basically akka isn't much different than plain-old-java in that sense... you don't get guaranteed delivery of anything unless you add some form of persistence. You can use any notion that fits from a local structured log to a database or message queue, leveraging akka persistence or just leveraging your own datastore. Just be careful about where you add your guarantees - highly scalable + guaranteed everything are at odds with one another. Try to keep the guarantees as light and high-level as possible while still making the app correct. Matt On Thursday, April 27, 2017 at 3:08:30 AM UTC-4, Laxmi Narayan wrote: > > Hi , > > I am working a high scalable application where I want to use akka as > processing framework. > > But after reading not 100% guaranteed delivery I am actually afraid of > using it. > > I have checked supervision strategy example but I am afraid of using it > inside application. > > It says I will x number of attempts to push message and mostly db > connections will be inside > > actor code , or may be mostly code to push to queue , if Ithat fails , I > am screwed. > > Have any body using it with guaranteed delivery enabled in production ? > -- >>>>>>>>>> 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.
