@AutoConfiguration @AutoConfigureBefore(value=AxonAutoConfiguration.class) @ConditionalOnClass(value=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() |
@Bean public AxonServerConfiguration axonServerConfiguration()
@Bean @ConditionalOnMissingBean public ManagedChannelCustomizer managedChannelCustomizer()
@Bean @ConditionalOnMissingBean public RoutingStrategy routingStrategy()
@Bean @ConditionalOnMissingBean public CommandPriorityCalculator commandPriorityCalculator()
@Bean @ConditionalOnMissingBean public CommandLoadFactorProvider commandLoadFactorProvider(AxonServerConfiguration configuration)
@Bean @ConditionalOnMissingBean public QueryPriorityCalculator queryPriorityCalculator()
@Bean @ConditionalOnMissingBean public QueryInvocationErrorHandler queryInvocationErrorHandler()
@ConditionalOnMissingBean @Bean public TargetContextResolver<Message<?>> targetContextResolver()
@Bean @ConditionalOnMissingClass(value="org.axonframework.extensions.multitenancy.autoconfig.MultiTenancyAxonServerAutoConfiguration") public EventProcessorInfoConfiguration processorInfoConfiguration(EventProcessingConfiguration eventProcessingConfiguration, AxonServerConnectionManager connectionManager, AxonServerConfiguration configuration)
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(name="axon.axonserver.event-store.enabled", matchIfMissing=true) public EventScheduler eventScheduler(@Qualifier(value="eventSerializer") 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 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.ApplicationContextAware
org.springframework.beans.BeansException
Copyright © 2010–2024. All rights reserved.