EventCallbackServiceand exposing it as OSGi service allows to receive callbacks, after the events have been handled by their respective listener. In order to invoke a callback, the name of the callback service must be set in the
MotechEventand must match the name returned by the
failureCallback(MotechEvent event, Throwable throwable)¶
Callback method, invoked when the event handler method has thrown an exception.
- event – the event that was being handled
- throwable – the throwable that has caused the failure
true, if the event system should proceed with retries; false otherwise