Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: need to improve documentation how to receive unhandled + dead letters #5334

Closed
Aaronontheweb opened this issue Oct 21, 2021 · 0 comments · Fixed by #6662
Closed

Docs: need to improve documentation how to receive unhandled + dead letters #5334

Aaronontheweb opened this issue Oct 21, 2021 · 0 comments · Fixed by #6662

Comments

@Aaronontheweb
Copy link
Member

Please describe what you are trying to understand
Original issue reported by user here at SO: https://stackoverflow.com/questions/69656719/akka-net-1-4-dead-letter-handler-eventstream-subscribe

Just because it cost me a few hours, I'd like to share the following insight, may it be interesting for someone: If we want to handle dead letters by ourselves, the akka.net documentation (https://getakka.net/articles/utilities/event-bus.html) says we should use

"system.EventStream.Subscribe(deadletterWatchActorRef, typeof(DeadLetter));" 

This is only partly true - yes, this catches those messages which are strictly "dead letters", those whose recipient is currently dead. But it does not catch the unhandled messages and the dropped ones. If you want that (and I'm pretty sure that 99% of the use cases don't want to finely differentiate between unprocessed, dropped and really dead letters), you have to use "AllDeadLetters" instead of "DeadLetters", so the proper call is

system.EventStream.Subscribe(deadletterWatchActorRef, typeof(AllDeadLetters));

Which pages have you looked at?

  1. https://getakka.net/articles/utilities/event-bus.html

What did these pages not make clear?
Doesn't distinguish between dead letters and unhandled messages, and doesn't explain how to capture both.

How can we do it better?
Go into detail on what the different types of unhandled messages mean and explain how to subscribe to all of them via the EventStream. Might want to make this information more easily discoverable in the navigation too.

F0b0s added a commit to F0b0s/akka.net that referenced this issue Apr 23, 2023
Aaronontheweb added a commit that referenced this issue Apr 24, 2023
* Documentation of EventStream unhandled messages notification has been improved (#5334).

* Fix after review.

* Fix after review.

* Update event-bus.md

---------

Co-authored-by: Aaron Stannard <aaron@petabridge.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant