Do all messages that could not be delivered, for any reason, end-up in dead-letters?

46 views
Skip to first unread message

Sebastien Diot

unread,
Aug 3, 2012, 7:03:52 AM8/3/12
to akka...@googlegroups.com
As a follow-up to my question "When can delivery fail *within the same JVM*?" (which got no reply so far, by the way), I would like to know if Akka at least guaranty that any message which could not be delivered ends up in "dead letters"? Also, if the message was sent to a remote actor, does it end up in the sender's actor-system "dead letters", or the receiver's actor-system "dead letters", or does it depend on the failure?

Is there known cases where the messages just get lost completely?

And when is a message considered "delivered" anyway? When it gets in the mailbox, or when it entered the actor's processing code, or when the processing code successfully returns? (The later is the only "reliable" definition IMO)

Roland Kuhn

unread,
Aug 3, 2012, 7:45:05 AM8/3/12
to akka...@googlegroups.com
Hi Sebastien,

3 aug 2012 kl. 13:03 skrev Sebastien Diot:

As a follow-up to my question "When can delivery fail *within the same JVM*?" (which got no reply so far, by the way), I would like to know if Akka at least guaranty that any message which could not be delivered ends up in "dead letters"? Also, if the message was sent to a remote actor, does it end up in the sender's actor-system "dead letters", or the receiver's actor-system "dead letters", or does it depend on the failure?

As stated in the docs, delivery to deadLetters is best-effort only, and as I described a while back on this list there is a known race during actor termination which loses messages even within the local JVM. And yes, if that race would be fixable for a reasonable price we would already have done so. When remoting comes into play, the message may be lost or queued to deadLetters at any point of its travel, which means at the sending or receiving actor system or any system in-between (for complex deployment scenarios).

Is there known cases where the messages just get lost completely?

And when is a message considered "delivered" anyway? When it gets in the mailbox, or when it entered the actor's processing code, or when the processing code successfully returns? (The later is the only "reliable" definition IMO)

The rule with Akka is quite simple: no matter which of these interpretations you choose, delivery is not guaranteed. And the reason is that all of them (including no delivery guarantee at all) may be valid in different scenarios, not one size fits all.

Regards,

Roland Kuhn
Typesafe – The software stack for applications that scale.
twitter: @rolandkuhn


√iktor Ҡlang

unread,
Aug 3, 2012, 7:48:04 AM8/3/12
to akka...@googlegroups.com
One might also want to point out that on the JVM neither:

A) Allocations are guaranteed to succeed - OutOfMemoryError
B) Method calls are guaranteed to happend - StackOverflowError, AbstractMethodError etc
 

Cheers,



Regards,

Roland Kuhn
Typesafe – The software stack for applications that scale.
twitter: @rolandkuhn


--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.



--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: @viktorklang

Reply all
Reply to author
Forward
0 new messages