Class AxonTimeoutAutoConfiguration
java.lang.Object
org.axonframework.extension.springboot.autoconfig.AxonTimeoutAutoConfiguration
@AutoConfiguration
@EnableConfigurationProperties(TimeoutProperties.class)
public class AxonTimeoutAutoConfiguration
extends Object
Translates
TimeoutProperties into the HandlerTimeoutConfiguration and
TimeoutUnitOfWorkFactoryConfiguration components that drive the timeout behavior.
The actual wiring of the timeout behavior, wrapping message handlers with a timeout, and decorating the
UnitOfWorkFactory used by the command bus, query bus, and every event processor so every UnitOfWork
they create is time-limited, is done by the HandlerTimeoutConfigurationEnhancer and
TimeoutUnitOfWorkFactoryConfigurationEnhancer.
- Since:
- 4.11.0
- Author:
- Mitchell Herrijgers, Steven van Beelen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBean creation method specifically to disable handler-timeout behavior, by setting aHandlerTimeoutConfiguration.DISABLEDBean creation method specifically to disableUnitOfWorkFactory-timeout behavior, by setting aTimeoutUnitOfWorkFactoryConfiguration.DISABLEDhandlerTimeoutConfiguration(TimeoutProperties properties) Bean creation method for theHandlerTimeoutConfiguration, translated from the givenproperties.Bean creation method for theTimeoutUnitOfWorkFactoryConfiguration, translated from the givenproperties.
-
Constructor Details
-
AxonTimeoutAutoConfiguration
public AxonTimeoutAutoConfiguration()
-
-
Method Details
-
handlerTimeoutConfiguration
@Bean @ConditionalOnProperty(prefix="axon.timeout", name="enabled", havingValue="true", matchIfMissing=true) public HandlerTimeoutConfiguration handlerTimeoutConfiguration(TimeoutProperties properties) Bean creation method for theHandlerTimeoutConfiguration, translated from the givenproperties. Picked up by theHandlerTimeoutConfigurationEnhancerto wrap message handlers with a timeout.- Parameters:
properties- the timeout properties to translate into aHandlerTimeoutConfiguration- Returns:
- the
HandlerTimeoutConfigurationdriving handler-level timeout behavior
-
disabledHandlerTimeoutConfiguration
@Bean @ConditionalOnProperty(prefix="axon.timeout", name="enabled", havingValue="false", matchIfMissing=false) public HandlerTimeoutConfiguration disabledHandlerTimeoutConfiguration()Bean creation method specifically to disable handler-timeout behavior, by setting aHandlerTimeoutConfiguration.DISABLED- Returns:
- a
HandlerTimeoutConfiguration.DISABLEDinstance
-
timeoutUnitOfWorkFactoryConfiguration
@Bean @ConditionalOnProperty(prefix="axon.timeout", name="enabled", havingValue="true", matchIfMissing=true) public TimeoutUnitOfWorkFactoryConfiguration timeoutUnitOfWorkFactoryConfiguration(TimeoutProperties properties) Bean creation method for theTimeoutUnitOfWorkFactoryConfiguration, translated from the givenproperties. Picked up by theTimeoutUnitOfWorkFactoryConfigurationEnhancerto decorate theUnitOfWorkFactoryused by the command bus, query bus, and every event processor, constructing timeout-specificUnitOfWorkinstances for each.- Parameters:
properties- the timeout properties to translate into aTimeoutUnitOfWorkFactoryConfiguration- Returns:
- the
TimeoutUnitOfWorkFactoryConfigurationdriving transaction-level timeout behavior
-
disabledTimeoutUnitOfWorkFactoryConfiguration
@Bean @ConditionalOnProperty(prefix="axon.timeout", name="enabled", havingValue="false", matchIfMissing=false) public TimeoutUnitOfWorkFactoryConfiguration disabledTimeoutUnitOfWorkFactoryConfiguration()Bean creation method specifically to disableUnitOfWorkFactory-timeout behavior, by setting aTimeoutUnitOfWorkFactoryConfiguration.DISABLED- Returns:
- a
TimeoutUnitOfWorkFactoryConfiguration.DISABLEDinstance
-