Class SendAndDontWaitErrorHandler.RethrowingSendAndDontWaitErrorHandler
- java.lang.Object
-
- dk.cloudcreate.essentials.reactive.command.SendAndDontWaitErrorHandler.RethrowingSendAndDontWaitErrorHandler
-
- All Implemented Interfaces:
SendAndDontWaitErrorHandler
- Enclosing interface:
- SendAndDontWaitErrorHandler
public static class SendAndDontWaitErrorHandler.RethrowingSendAndDontWaitErrorHandler extends Object implements SendAndDontWaitErrorHandler
FallbackSendAndDontWaitErrorHandlerthat error logs any issues and rethrows the exception.
TheSendAndDontWaitErrorHandler.RethrowingSendAndDontWaitErrorHandleris compatible with a Durable Command Bus (e.g. using DurableQueues), as rethrowing the exceptions allows the command to be retried
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dk.cloudcreate.essentials.reactive.command.SendAndDontWaitErrorHandler
SendAndDontWaitErrorHandler.FallbackSendAndDontWaitErrorHandler, SendAndDontWaitErrorHandler.RethrowingSendAndDontWaitErrorHandler
-
-
Constructor Summary
Constructors Constructor Description RethrowingSendAndDontWaitErrorHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleError(Exception exception, Object command, CommandHandler commandHandler)Handle an exception that occurred duringCommandBus.sendAndDontWait(Object)/CommandBus.sendAndDontWait(Object, Duration)
-
-
-
Method Detail
-
handleError
public void handleError(Exception exception, Object command, CommandHandler commandHandler)
Description copied from interface:SendAndDontWaitErrorHandlerHandle an exception that occurred duringCommandBus.sendAndDontWait(Object)/CommandBus.sendAndDontWait(Object, Duration)- Specified by:
handleErrorin interfaceSendAndDontWaitErrorHandler- Parameters:
exception- the exception that occurred duringCommandBus.sendAndDontWait(Object)/CommandBus.sendAndDontWait(Object, Duration)command- the command message that caused the exception (can be wrapped in an infrastructure wrapper, such as a Message/QueuedMessage, depending on which transport channel is used)commandHandler- the command handler that can handle the command
-
-