While I have configured command side to retry command with RetryScheduler I’m finding the way how to do similar with event side.
I see that RetryPolicy and ErrorHandler should help here but I don’t see the way how to propagate the number of “retryCount”. In RetryScheduler is list of Exceptions which indicates the number of retries. Currently events are rescheduled for execution in 2seconds and rescheduling never stops.
Here are my questions:
- How to implement “retryCount” on event side? Is it even ok to do this?
- What to do with event’s that cannot be processed? For example if I handle event in viewbuilder event listener, throw away this event and process next events my view will be in inconsistent state. (lets think about the situation that db was down for 5 seconds…)
- I’d like to let user know about something goes wrong. I’m thinking about implement websocket and send notification to user. Is this the right way or is there any simpler solution? Any examples?