Does mailbox has a ack mechanism?

For sender, it want to know if messages arrive target actor’s mailbox.
Are there some ack mechanisms to implement this?

In short: no, because it would not be very valuable.

I recommend that you read the Message Delivery Reliability section of the docs to understand why auto-ack on entry in mailbox would not make much sense.

It may also be interesting to look at the Reliable Delivery feature

I’d argue that Reliable Delivery is definitely an Ack mechanism. “Confirmations” == “Acknowledgements”

Acknowledgements are definitely useful, what I (and the docs) am saying is that an auto ack based on message being queued in the inbox of an actor would not be.

Reliable delivery is not built around any auto-ack but a business logic ack where you as a user decide what it means for your use case that a message was successfully handled and that you can send that confirmation.

1 Like

If target is non-existing. Ask pattern will wait to timeout.
Reliable Delivery can’t detect if a actor or entity is there.

In other words: How Reliable Delivery fails immediately if remote actor/entity dead.

In other words: How Reliable Delivery fails immediately if remote actor/entity dead.

This is a mathematical impossibility. No system can offer this or will ever be able to offer this. In a distributed system you cannot know the state of something on a remote system with absolute certainty. The only thing you can do is send a message and deal with the response and/or the timeout.

“fail immediately” is impossible. What if the recipient died 1 nanosecond before the message was sent? Or, even more interestingly, failed 1 nanosecond after the message was sent, but before the electrical signal was sent down the cable to reach the other system?

1 Like

That’s fair.

1 Like

If target is non-existing. Ask pattern will wait to timeout.
Reliable Delivery can’t detect if a actor or entity is there.

That’s not quite true, what is possible with Akka is to watch the remote actor for termination. It can still terminate after a message was sent and before the termination message reaches the watching actor though.

A message can also still arrive to the node where the receiving actor lives, be successfully enqueued in the mailbox but never be processed because of the actor crashing or stopping before completing previous messages in the mailbox.