I recently switch from subscribing event processors to tracking event processors. As far as I know I have two possibilities to handle exceptions during event handling.
I can log the exceptions and continue as if nothing happened.
Problem: My event handlers write data in read model tables for querying purposes. Just ignoring the event causes an inconsistency between the state of the domain and the readmodels.
Solution: Fixing the issue which caused the log entry and replay all events afterwards. Until the fix the system is an inconsistent state. Furthermore I need some sort of alarming that informs me about such incidents.
Throw an exception which causes the event processor to submit the same event again and again until it could be handled without exception.
Problem: Subsequent events of the same tracking event processor groups won't be handled until the event causing the exception can be handled successfully.
Solution: Implement fine grained tracking event processor groups. So in case of such an incident only parts of the system are affected.
As the possibilities described above are not convincing to me I wonder whether there are other possibilites or solutions. May be I missed something completely.
Thanks for any help.