Class AxonServerConfigurationEnhancer
java.lang.Object
io.axoniq.framework.axonserver.connector.configuration.AxonServerConfigurationEnhancer
- All Implemented Interfaces:
ConfigurationEnhancer
A
ConfigurationEnhancer that is auto-loadable by the ApplicationConfigurer, setting sensible defaults
when using Axon Server.
Will only register the following components if there is no component registered for the given class yet:
- Registers a default
AxonServerConfigurationfor classAxonServerConfiguration - Registers a
AxonServerConnectionManagerfor classAxonServerConnectionManager, connecting to Axon Server on start and disconnecting on shutdown. - Registers a default
ManagedChannelCustomizer(ManagedChannelCustomizer.identity()) for classManagedChannelCustomizer - Registers the
AxonServerEventStorageEnginefor classesEventStorageEngineandSnapshotStore, sharing the same instance for both so snapshot sourcing resolves the snapshot and the events that follow it in a single round trip to Axon Server. When aEventStorageEngineis already registered by the time this enhancer runs (e.g. when you combine Axon Server for snapshots with a different event storage backend) registers the lighterAxonServerSnapshotStorefor classSnapshotStoreinstead - Registers a
AxonServerCommandBusConnectorfor classCommandBusConnector - Registers a
AxonServerQueryBusConnectorfor classQueryBusConnector - Registers a
EventProcessorControlServicefor classEventProcessorControlService
Additionally, registers a AxonServerEventStorageEngineFactory
ComponentFactory constructing an
AxonServerEventStorageEngine for each named, non-default context requested (named
storageEngine@{context}).
Furthermore, this enhancer will decorate the following components:
- The
CommandBusConnectorin aPayloadConvertingCommandBusConnector, converting payloads using the presentMessageConverter. - The
QueryBusConnectorin aPayloadConvertingQueryBusConnector, converting payloads using the presentMessageConverter. - The
AxonServerConnectionManager, registering aTopologyChangeListenerwith theControlChannelof its default context on start, if one is present.
- Since:
- 4.0.0
- Author:
- Allard Buijze, Steven van Beelen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int -
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_ORDER- See Also:
-
-
Constructor Details
-
AxonServerConfigurationEnhancer
public AxonServerConfigurationEnhancer()
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
registry- The registry instance to enhance.
-
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.
-