Class MessagingConfigurationDefaults
java.lang.Object
org.axonframework.messaging.core.configuration.MessagingConfigurationDefaults
- All Implemented Interfaces:
ConfigurationEnhancer
A
ConfigurationEnhancer registering the default components of the MessagingConfigurer.
Will only register the following components if there is no component registered for the given class yet:
- Registers a
ClassBasedMessageTypeResolverfor classMessageTypeResolver - Registers a
JacksonConverterfor classConverter - Registers a
DelegatingMessageConverterusing the defaultJacksonConverter. - Registers a
DelegatingEventConverterusing the defaultJacksonConverter. - Registers a
DefaultCorrelationDataProviderRegistryfor classCorrelationDataProviderRegistrycontaining theMessageOriginProvider. - Registers a
DefaultDispatchInterceptorRegistryfor classDispatchInterceptorRegistrycontaining anCorrelationDataInterceptorif there areCorrelationDataProviderspresent. - Registers a
DefaultHandlerInterceptorRegistryfor classHandlerInterceptorRegistrycontaining anCorrelationDataInterceptorif there areCorrelationDataProviderspresent. - Registers a
TransactionalUnitOfWorkFactoryfor classUnitOfWorkFactory - Registers a
SimpleCommandBusfor classCommandBus - Registers a
CommandPriorityCalculator.defaultCalculator()for classCommandPriorityCalculator - Registers a
AnnotationRoutingStrategyfor classRoutingStrategy - Registers a
DefaultCommandGatewayfor classCommandGateway - Registers a
DefaultEventGatewayfor classEventGateway - Registers a
SimpleQueryBusfor classQueryBus - Registers a
SimpleQueryUpdateEmitterfor classQueryUpdateEmitter - Registers a
QueryPriorityCalculator.defaultCalculator()for classQueryPriorityCalculator - Registers a
DefaultQueryGatewayfor classQueryGateway - Registers a
DefaultMessageMonitorRegistryfor classMessageMonitorRegistry
Furthermore, this enhancer will decorate the:
- The
CommandGatewayin aConvertingCommandGatewaywith the presentMessageConverter. - The
CommandBusin aInterceptingCommandBusif there are anyMessageDispatchInterceptorspresent in theDispatchInterceptorRegistryorMessageHandlerInterceptorspresent in theHandlerInterceptorRegistry. - The
QueryBusin aInterceptingQueryBusif there are anyMessageDispatchInterceptorspresent in theDispatchInterceptorRegistryorMessageHandlerInterceptorspresent in theHandlerInterceptorRegistry.
- Since:
- 5.0.0
- Author:
- Steven van Beelen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe order in which theConvertingCommandGatewayis applied to theCommandGatewayin theComponentRegistry.static final intThe order ofthisenhancer compared to others, equal toInteger.MAX_VALUE. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenhance(ComponentRegistry registry) intorder()Returns the relative order this enhancer should be invoked in, compared to other instances.
-
Field Details
-
ENHANCER_ORDER
public static final int ENHANCER_ORDERThe order ofthisenhancer compared to others, equal toInteger.MAX_VALUE.- See Also:
-
CONVERTING_COMMAND_GATEWAY_ORDER
public static final int CONVERTING_COMMAND_GATEWAY_ORDERThe order in which theConvertingCommandGatewayis applied to theCommandGatewayin theComponentRegistry. As such, any decorator with a lower value will be applied to the delegate, and any higher value will be applied to theConvertingCommandGatewayitself. Using the same value can either lead to application of the decorator to the delegate or the converting command gateway, depending on the order of registration.The order of the
ConvertingCommandGatewayis set toInteger.MIN_VALUE + 100to ensure it is applied very early in the configuration process, but not the earliest to allow for other decorators to be applied.- See Also:
-
-
Constructor Details
-
MessagingConfigurationDefaults
public MessagingConfigurationDefaults()
-
-
Method Details
-
order
public int order()Description copied from interface:ConfigurationEnhancerReturns the relative order this enhancer should be invoked in, compared to other instances.Use lower (negative) values for enhancers providing sensible defaults, and higher values for enhancers that should be able to override values potentially previously set. Defaults to
0when not set.- Specified by:
orderin interfaceConfigurationEnhancer- Returns:
- The order in which this enhancer should be invoked.
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
registry- The registry instance to enhance.
-