Interface ExtensibleConfigurer

All Known Implementing Classes:
EventProcessorConfiguration, PooledStreamingEventProcessorConfiguration, SubscribingEventProcessorConfiguration

@Internal public interface ExtensibleConfigurer
A configurer that supports registering ConfigurationExtension instances.

Extensions are created eagerly when extend(Class, Supplier) is called — the factory is invoked immediately and the result is stored. If extend() is called multiple times for the same type, the new instance always replaces the previous one.

For reading extensions, see ExtendedConfiguration.

Since:
5.1.0
Author:
Mateusz Nowak
See Also:
  • Method Details

    • extend

      <T extends ConfigurationExtension<?>> ExtensibleConfigurer extend(Class<T> extensionType, Supplier<T> factory)
      Registers an extension factory for the given type and returns this configurer for chaining.

      The factory is invoked immediately — the extension is created eagerly, not lazily. If called multiple times for the same type, the new instance always replaces the previous one.

      Example:

      
       config.extend(DeadLetterQueueConfiguration.class, () -> new DeadLetterQueueConfiguration().enabled().factory(myFactory))
             .extend(MetricsExtension.class, () -> new MetricsExtension().enabled());
       
      Type Parameters:
      T - the extension type
      Parameters:
      extensionType - the extension class
      factory - a supplier that returns a configured extension
      Returns:
      this configurer, for fluent chaining