Class DeadLetterMultiTenancyConfigurationEnhancer

java.lang.Object
io.axoniq.framework.messaging.multitenancy.deadletter.DeadLetterMultiTenancyConfigurationEnhancer
All Implemented Interfaces:
ConfigurationEnhancer

@Internal public class DeadLetterMultiTenancyConfigurationEnhancer extends Object implements ConfigurationEnhancer
Makes an enabled dead-letter queue configuration tenant-aware by routing its configured queue factory per tenant.

This enhancer does nothing if the optional dependency for dead-letter queue support is not present on the classpath.

Since:
5.4.0
Author:
Jan Galinski
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The order at which dead-letter queue support is configured after the general and Axon Server multi-tenancy components.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of the DeadLetterMultiTenancyConfigurationEnhancer that uses the class loader which loaded this class to check for the presence of the optional dead-letter queue module.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    enhance(ComponentRegistry componentRegistry)
    Enhances the given registry with, for example, additional components and decorators.
    static boolean
    Checks whether the optional dead-letter queue module is available to the supplied class loader.
    int
    Returns the relative order this enhancer should be invoked in, compared to other instances.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ENHANCER_ORDER

      public static final int ENHANCER_ORDER
      The order at which dead-letter queue support is configured after the general and Axon Server multi-tenancy components.
      See Also:
  • Constructor Details

    • DeadLetterMultiTenancyConfigurationEnhancer

      public DeadLetterMultiTenancyConfigurationEnhancer()
      Creates a new instance of the DeadLetterMultiTenancyConfigurationEnhancer that uses the class loader which loaded this class to check for the presence of the optional dead-letter queue module.
  • Method Details

    • 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.
    • isDeadLetterQueuePresent

      public static boolean isDeadLetterQueuePresent(ClassLoader classLoader)
      Checks whether the optional dead-letter queue module is available to the supplied class loader.
      Parameters:
      classLoader - the class loader to inspect
      Returns:
      true when dead-letter queue support is available
    • enhance

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