Class DuplicateCommandHandlerResolution
java.lang.Object
org.axonframework.commandhandling.DuplicateCommandHandlerResolution
Enumeration describing a set of reasonable
DuplicateCommandHandlerResolver implementations. Can be used to
configure how a CommandBus should react upon a duplicate subscription of a
command handling function.- Since:
- 4.2
- Author:
- Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescriptionADuplicateCommandHandlerResolverimplementation which logs a warning message and resolve to returning the duplicate handler and overriding the existing command handler.ADuplicateCommandHandlerResolverimplementation which throws aDuplicateCommandHandlerSubscriptionException.ADuplicateCommandHandlerResolverimplementation that allows handlers to silently override previous registered handlers for the same command.
-
Method Details
-
logAndOverride
ADuplicateCommandHandlerResolverimplementation which logs a warning message and resolve to returning the duplicate handler and overriding the existing command handler.- Returns:
- an instance that logs duplicates
-
rejectDuplicates
ADuplicateCommandHandlerResolverimplementation which throws aDuplicateCommandHandlerSubscriptionException.- Returns:
- an instance that fails on duplicate registrations
-
silentOverride
ADuplicateCommandHandlerResolverimplementation that allows handlers to silently override previous registered handlers for the same command.- Returns:
- an instance that silently accepts duplicates
-