Interface PersistentStreamMessageSourceFactory

All Known Implementing Classes:
DefaultPersistentStreamMessageSourceFactory
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PersistentStreamMessageSourceFactory
Functional interface for creating instances of a PersistentStreamMessageSource.

This factory is used to construct message sources for persistent streams with specific configurations.

Since:
4.10.0
Author:
Marc Gathier
  • Method Details

    • build

      PersistentStreamMessageSource build(String name, io.axoniq.axonserver.connector.event.PersistentStreamProperties persistentStreamProperties, ScheduledExecutorService scheduler, int batchSize, String context, Configuration configuration)
      Builds a new instance of PersistentStreamMessageSource with the specified parameters.
      Parameters:
      name - The name of the persistent stream. It's a unique identifier of the PersistentStream connection with Axon Sever. Usage of the same name will overwrite the existing connection.
      persistentStreamProperties - The properties of the persistent stream, containing configuration details.
      scheduler - The ScheduledExecutorService to be used for scheduling tasks related to the message source.
      batchSize - The number of events to be fetched in a single batch from the stream.
      context - The context in which the persistent stream operates. This can be used to differentiate streams in different environments or applications.
      Returns:
      A new instance of PersistentStreamMessageSource configured with the provided parameters.
      Throws:
      IllegalArgumentException - If any of the required parameters are null or invalid.
      AxonServerException - If there's an issue connecting to or configuring the Axon Server.