Can Akka save her outgoing messages in a reliable mailbox?

Can an Akka actor store their outgoing messages in a local durable outbox until his remote receiver can receive them in his own reliable mailbox? In other words, can I use Akka to execute store-and-forward emails in a style similar to email?

+4
source share
3 answers

You can do this with reliable Eventsourced channels . Eventsourced is an event source library for Akka.

+4
source

Martins second answer: Akka actors are called upon to form a basic building block on which more complex things can be built, and Martins' library is a great example of this. Providing more and more of this functionality in the โ€œfoundationโ€ is what we tried a few years ago and came back, instead keeping it lean and focused.

+2
source

You can use the Akka trusted proxy template ( http://doc.akka.io/docs/akka/snapshot/contrib/reliable-proxy.html ) by adding some message spelling to it.

In addition, you can create your own reliable mailbox that can save messages to the database with the message status, timestamp and type of the target actor (it can also solve the problem with reliable mailboxes for resizable router routes). And you can also use this repository for your reliable proxy (also using the timestamp type and the TARGET actor type). In this case, you can restore timer messages from dead cluster nodes by living actors of the same type.

We use such a mechanism in our project, our reliable mailboxes also support confirmation mode, and we can restore the waiting time for messages during processing (if the actor dies during message processing). Just don't forget about maxFailures (if confirmed) and don't save PoisonPill / Kill messages.

+1
source

All Articles