EventHandler retry

321 views
Skip to first unread message

Lukáš Vasek

unread,
Jun 23, 2016, 4:57:21 AM6/23/16
to Axon Framework Users
Hello,
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:

  1. How to implement "retryCount" on event side? Is it even ok to do this?
  2. 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...)
  3. 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?

Thanks

Lukas

Allard Buijze

unread,
Jul 4, 2016, 5:39:37 AM7/4/16
to Axon Framework Users
Hi Lukas,

unfortunately, the API of the current ErrorHandler doesn't provide any information about the number of retries. If you need to keep track of that, you could store it inside the ErrorHandler implementation itself. The combination of message and handler could form the key, and the list of error the value of a map. The challenge would be to remove the entries once the event has been correctly handled.

Cheers,

Allard


--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages