Class DuplicateQueryHandlerResolution
java.lang.Object
org.axonframework.queryhandling.registration.DuplicateQueryHandlerResolution
Enumeration describing a set of reasonable
DuplicateQueryHandlerResolver implementations. Can be used to
configure how a QueryBus should react upon a duplicate subscription of a
query handling function.- Since:
- 4.6.0
- Author:
- Mitchell Herrijgers
-
Method Summary
Modifier and TypeMethodDescriptionADuplicateQueryHandlerResolverimplementation which logs a warning message and resolve to returning both handlers as query handlers.ADuplicateQueryHandlerResolverimplementation which throws aDuplicateQueryHandlerSubscriptionException.ADuplicateQueryHandlerResolverimplementation that allows handlers to silently add previous registered handlers for the same query.
-
Method Details
-
logAndAccept
ADuplicateQueryHandlerResolverimplementation which logs a warning message and resolve to returning both handlers as query handlers.- Returns:
- an instance that logs duplicates
-
rejectDuplicates
ADuplicateQueryHandlerResolverimplementation which throws aDuplicateQueryHandlerSubscriptionException.- Returns:
- an instance that fails on duplicate registrations
-
silentlyAdd
ADuplicateQueryHandlerResolverimplementation that allows handlers to silently add previous registered handlers for the same query.- Returns:
- an instance that silently add duplicates, adding both to the bus
-