Class TimeoutUnitOfWorkFactoryConfigurationEnhancer

java.lang.Object
org.axonframework.messaging.core.timeout.TimeoutUnitOfWorkFactoryConfigurationEnhancer
All Implemented Interfaces:
ConfigurationEnhancer

@RegistrationScope("Register the decorators for the named CommandBus/QueryBus UnitOfWorkFactory components and the EventProcessorCustomization decorator once at the root; do not re-invoke in child module registries. CommandBus, QueryBus, and EventProcessorCustomization are all single, top-level components, never re-resolved per module, so re-invoking this enhancer per module would register redundant, unused decorators in registries that never consult them.") public class TimeoutUnitOfWorkFactoryConfigurationEnhancer extends Object implements ConfigurationEnhancer
A ConfigurationEnhancer that decorates the UnitOfWorkFactory used by the CommandBus, QueryBus, and every event processor, so every UnitOfWork it creates has a timeout, based on the TimeoutUnitOfWorkFactoryConfiguration present in the Configuration.

Automatically registers a TimeoutUnitOfWorkFactoryConfiguration.DEFAULT TimeoutUnitOfWorkFactoryConfiguration when none is present yet.

Since:
5.4.0
Author:
Steven van Beelen
See Also:
  • Field Details

  • Constructor Details

    • TimeoutUnitOfWorkFactoryConfigurationEnhancer

      public TimeoutUnitOfWorkFactoryConfigurationEnhancer()
  • Method Details

    • enhance

      public void enhance(ComponentRegistry registry)
      Description copied from interface: ConfigurationEnhancer
      Enhances the given registry with, for example, additional components and decorators.
      Specified by:
      enhance in interface ConfigurationEnhancer
      Parameters:
      registry - The registry instance to enhance.
    • order

      public int order()
      Description copied from interface: ConfigurationEnhancer
      Returns 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 0 when not set.

      Specified by:
      order in interface ConfigurationEnhancer
      Returns:
      The order in which this enhancer should be invoked.