public class LoggingDuplicateQueryHandlerResolver extends Object implements DuplicateQueryHandlerResolver
DuplicateQueryHandlerResolverthat allows registrations to be overridden by new handlers, but logs this (on WARN level) to a given logger.
|Modifier and Type||Method and Description|
Returns an instance that logs duplicate registrations.
Chooses what to do when a duplicate handler is registered, returning the handlers that should be selected for query handling, or otherwise throwing an exception to reject registration altogether.
public static LoggingDuplicateQueryHandlerResolver instance()
public List<QuerySubscription<?>> resolve(String queryName, Type responseType, List<QuerySubscription<?>> registeredHandlers, QuerySubscription<?> candidateHandler)
queryName- The name of the query for which the duplicate was detected
MessageHandlerinstances already registered with the Query Bus
MessageHandlerthat is newly registered and conflicts with the existing registrations
MessageHandlerinstances. It is up to the implementation to discard implementations already in the list
Copyright © 2010–2023. All rights reserved.