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

Handle failed aggregate loading during message delivery #1472

Open
dmytro-kashcheiev opened this issue Sep 27, 2022 · 0 comments
Open

Handle failed aggregate loading during message delivery #1472

dmytro-kashcheiev opened this issue Sep 27, 2022 · 0 comments
Assignees
Labels
Milestone

Comments

@dmytro-kashcheiev
Copy link
Collaborator

dmytro-kashcheiev commented Sep 27, 2022

Delivery behavior, when it's impossible to load Aggregate for some reason (a coding mistake, storage issues, etc.), is unclear. It looks like all commands and events that point to corrupted Aggregate stays in InboxStorage forever. And re-delivered on each shard delivery iteration.

Steps to reproduce:

  1. Throw an exception in the @Apply method of the aggregate.
  2. Send FirstCommand to the aggregate and emit the event that will lead to the exception.
  3. Send SecondCommand to the aggregate and emit the event that will lead to the exception.
  4. Send one more command with the same ShardIndex to another entity.

What happens:

  • Aggregate failed to apply the event and threw an exception;
  • Diagnostic event CannotDispatchDuplicateCommand thrown for SecondCommand.

What I expect:

  • Aggregate failed to apply the event and threw an exception;
  • Diagnostic event CannotDispatchDuplicateCommand thrown for SecondCommand;
  • Another entity successfully handles the command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Status: Done
Development

No branches or pull requests

3 participants