@AutoConfiguration @AutoConfigureBefore(value=AxonAutoConfiguration.class) @ConditionalOnClass(value=org.axonframework.axonserver.connector.AxonServerConfiguration.class) @EnableConfigurationProperties(value=TagsConfigurationProperties.class) @ConditionalOnProperty(name="axon.axonserver.enabled", matchIfMissing=true) public class AxonServerAutoConfiguration extends Object implements org.springframework.context.ApplicationContextAware
| Modifier and Type | Class and Description |
|---|---|
static class |
AxonServerAutoConfiguration.ConnectionDetailsConnectionManagerConfiguration |
static class |
AxonServerAutoConfiguration.DefaultConnectionManagerConfiguration |
| Constructor and Description |
|---|
AxonServerAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
AxonServerConfiguration |
axonServerConfiguration() |
PersistentStreamScheduledExecutorBuilder |
backwardsCompatiblePersistentStreamScheduledExecutorBuilder(ScheduledExecutorService persistentStreamScheduler)
Creates a
PersistentStreamScheduledExecutorBuilder defaulting to the same given
persistentStreamScheduler on each invocation. |
CommandLoadFactorProvider |
commandLoadFactorProvider(AxonServerConfiguration configuration) |
CommandPriorityCalculator |
commandPriorityCalculator() |
org.axonframework.eventhandling.scheduling.EventScheduler |
eventScheduler(org.axonframework.serialization.Serializer eventSerializer,
AxonServerConnectionManager connectionManager) |
ManagedChannelCustomizer |
managedChannelCustomizer() |
PersistentStreamMessageSourceFactory |
persistentStreamMessageSourceFactory()
Creates a bean of type
PersistentStreamMessageSourceFactory if one is not already defined. |
org.axonframework.config.ConfigurerModule |
persistentStreamProcessorsConfigurerModule(EventProcessorProperties processorProperties,
AxonServerConfiguration axonServerConfiguration)
Creates a
ConfigurerModule to configure
sequencing policies for persistent streams
connected to subscribing event processors with
a dead letter queue. |
PersistentStreamMessageSourceRegistrar |
persistentStreamRegistrar(org.springframework.core.env.Environment environment,
PersistentStreamScheduledExecutorBuilder executorBuilder)
Constructs a
PersistentStreamMessageSourceRegistrar to create and register Spring beans for persistent
streams. |
PersistentStreamScheduledExecutorBuilder |
persistentStreamScheduledExecutorBuilder()
Creates a
PersistentStreamScheduledExecutorBuilder that constructs
ScheduledExecutorServices for each persistent stream. |
EventProcessorInfoConfiguration |
processorInfoConfiguration(org.axonframework.config.EventProcessingConfiguration eventProcessingConfiguration,
AxonServerConnectionManager connectionManager,
AxonServerConfiguration configuration) |
org.axonframework.queryhandling.QueryInvocationErrorHandler |
queryInvocationErrorHandler() |
QueryPriorityCalculator |
queryPriorityCalculator() |
org.axonframework.commandhandling.distributed.RoutingStrategy |
routingStrategy() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
TargetContextResolver<org.axonframework.messaging.Message<?>> |
targetContextResolver() |
@Bean public AxonServerConfiguration axonServerConfiguration()
@Bean @ConditionalOnMissingBean public ManagedChannelCustomizer managedChannelCustomizer()
@Bean @ConditionalOnMissingBean public org.axonframework.commandhandling.distributed.RoutingStrategy routingStrategy()
@Bean @ConditionalOnMissingBean public CommandPriorityCalculator commandPriorityCalculator()
@Bean @ConditionalOnMissingBean public CommandLoadFactorProvider commandLoadFactorProvider(AxonServerConfiguration configuration)
@Bean @ConditionalOnMissingBean public QueryPriorityCalculator queryPriorityCalculator()
@Bean @ConditionalOnMissingBean public org.axonframework.queryhandling.QueryInvocationErrorHandler queryInvocationErrorHandler()
@ConditionalOnMissingBean @Bean public TargetContextResolver<org.axonframework.messaging.Message<?>> targetContextResolver()
@Bean @ConditionalOnMissingClass(value="org.axonframework.extensions.multitenancy.autoconfig.MultiTenancyAxonServerAutoConfiguration") public EventProcessorInfoConfiguration processorInfoConfiguration(org.axonframework.config.EventProcessingConfiguration eventProcessingConfiguration, AxonServerConnectionManager connectionManager, AxonServerConfiguration configuration)
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(name="axon.axonserver.event-store.enabled",
matchIfMissing=true)
public org.axonframework.eventhandling.scheduling.EventScheduler eventScheduler(@Qualifier(value="eventSerializer")
org.axonframework.serialization.Serializer eventSerializer,
AxonServerConnectionManager connectionManager)
@Bean @ConditionalOnMissingBean @ConditionalOnMissingQualifiedBean(beanClass=java.util.concurrent.ScheduledExecutorService.class, qualifier="persistentStreamScheduler") @ConditionalOnProperty(name="axon.axonserver.event-store.enabled", matchIfMissing=true) public PersistentStreamScheduledExecutorBuilder persistentStreamScheduledExecutorBuilder()
PersistentStreamScheduledExecutorBuilder that constructs
ScheduledExecutorServices for each persistent stream.
Defaults to a PersistentStreamScheduledExecutorBuilder.defaultFactory().PersistentStreamScheduledExecutorBuilder that constructs
ScheduledExecutorServices for each persistent stream.@Bean @ConditionalOnMissingBean @ConditionalOnQualifiedBean(beanClass=java.util.concurrent.ScheduledExecutorService.class, qualifier="persistentStreamScheduler") @ConditionalOnProperty(name="axon.axonserver.event-store.enabled", matchIfMissing=true) public PersistentStreamScheduledExecutorBuilder backwardsCompatiblePersistentStreamScheduledExecutorBuilder(@Qualifier(value="persistentStreamScheduler") ScheduledExecutorService persistentStreamScheduler)
PersistentStreamScheduledExecutorBuilder defaulting to the same given
persistentStreamScheduler on each invocation. This bean-creation method is in place for backwards
compatibility with 4.10.0, which defaulted to this behavior based on a bean of type
ScheduledExecutorService with qualified persistentStreamScheduler.@Bean
@ConditionalOnProperty(name="axon.axonserver.event-store.enabled",
matchIfMissing=true)
public PersistentStreamMessageSourceRegistrar persistentStreamRegistrar(org.springframework.core.env.Environment environment,
PersistentStreamScheduledExecutorBuilder executorBuilder)
PersistentStreamMessageSourceRegistrar to create and register Spring beans for persistent
streams.environment - The Spring Environment.executorBuilder - The PersistentStreamScheduledExecutorBuilder used to construct a
ScheduledExecutorService to perform the persistent stream's tasks with.PersistentStreamMessageSourceRegistrar to create and register Spring beans for persistent
streams.@Bean @ConditionalOnMissingBean public PersistentStreamMessageSourceFactory persistentStreamMessageSourceFactory()
PersistentStreamMessageSourceFactory if one is not already defined. This factory
is used to create instances of the PersistentStreamMessageSource with specified configurations.
The returned factory creates a new PersistentStreamMessageSource with the following parameters:
name: The name of the persistent stream.configuration: The Axon framework configuration.persistentStreamProperties: Properties of the persistent stream.scheduler: The ScheduledExecutorService for scheduling tasks.batchSize: The number of events to fetch in a single batch.context: The context in which the persistent stream operates.PersistentStreamMessageSourceFactory that constructs PersistentStreamMessageSource
instances.@Bean
@ConditionalOnProperty(name="axon.axonserver.event-store.enabled",
matchIfMissing=true)
public org.axonframework.config.ConfigurerModule persistentStreamProcessorsConfigurerModule(EventProcessorProperties processorProperties,
AxonServerConfiguration axonServerConfiguration)
ConfigurerModule to configure
sequencing policies for persistent streams
connected to subscribing event processors with
a dead letter queue.processorProperties - Contains the configured event processors.axonServerConfiguration - Contains the persistent stream definitions.ConfigurerModule to configure
sequencing policies for persistent streams
connected to subscribing event processors with
a dead letter queue.public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2010–2024. All rights reserved.