Logo

Raúl Raja

  • Archive
  • RSS
  • Ask me anything

Sending Email with Scala and Akka Actors

How many apps have you built where you have to send out emails for any variety of reasons?

As I make my way learning about Akka Actors I decided to use them in one scala app I’m working on.

I decided to used them for this task not just because of the scalability and easy concurrent model but also for 3 main reasons.

  • The builtin configurable supervisor strategy allows you to monitor child workers and decide what policy applies should there be an exception.
  • I could easily reschedule email delivery attempts on common email exception often times thrown by SMTP servers.
  • Actor routers allow you to dispatch messages to a pool of actors in an intelligent way. In this case we use the SmallestMailboxRouter which sends messages to actors in the pool with a smaller workload.

The code is dependent on apache commons-email and some built in play! framework 2 stuff but getting rid of it would be trivial for anyone wanting to reuse it on a different context.

https://gist.github.com/4543801
    • #scala
    • #akka
    • #java
  • 4 months ago
  • Comments
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Recent comments

Blog comments powered by Disqus
← Previous • Next →

About

Co-Founder and Dev @47deg

Me, Elsewhere

  • @raulraja on Twitter
  • Facebook Profile
  • raulraja on Flickr
  • raulraja on Foursquare
  • Linkedin Profile
  • raulraja on github

Twitter

loading tweets…

I Dig These Posts

See more →
  • Post via javielinux
    5 consejos para crear tus estilos en Android

    A continuación dejo algunos consejos a la hora de crear estilos y temas en Android. Todos estos...

    Post via javielinux
  • Video via jorgegalindo
    Video

    Ayer me puse tierno y posteé un video de como utilizar la tecnología para planear tener un bebe… Pues pilla! Como utilizar Google Glasses para ligar...

    Video via jorgegalindo
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Copyright Raúl Raja 2013.

Effector Theme by Pixel Union