Class DefaultReactivePulsarReaderFactory<T>

java.lang.Object
org.springframework.pulsar.reactive.core.DefaultReactivePulsarReaderFactory<T>
Type Parameters:
T - underlying payload type for the reactive reader.
All Implemented Interfaces:
ReactivePulsarReaderFactory<T>

public class DefaultReactivePulsarReaderFactory<T> extends Object implements ReactivePulsarReaderFactory<T>
Default implementation for ReactivePulsarReaderFactory.
Author:
Christophe Bornet, Chris Bono
  • Constructor Details

    • DefaultReactivePulsarReaderFactory

      public DefaultReactivePulsarReaderFactory(org.apache.pulsar.reactive.client.api.ReactivePulsarClient reactivePulsarClient, List<ReactiveMessageReaderBuilderCustomizer<T>> defaultConfigCustomizers)
      Construct an instance.
      Parameters:
      reactivePulsarClient - the reactive client
      defaultConfigCustomizers - the optional list of customizers that defines the default configuration for each created reader.
  • Method Details

    • createReader

      public org.apache.pulsar.reactive.client.api.ReactiveMessageReader<T> createReader(org.apache.pulsar.client.api.Schema<T> schema)
      Description copied from interface: ReactivePulsarReaderFactory
      Create a reactive message reader.
      Specified by:
      createReader in interface ReactivePulsarReaderFactory<T>
      Parameters:
      schema - the schema of the messages to be read
      Returns:
      the reactive message reader
    • createReader

      public org.apache.pulsar.reactive.client.api.ReactiveMessageReader<T> createReader(org.apache.pulsar.client.api.Schema<T> schema, List<ReactiveMessageReaderBuilderCustomizer<T>> customizers)
      Description copied from interface: ReactivePulsarReaderFactory
      Create a reactive message reader.
      Specified by:
      createReader in interface ReactivePulsarReaderFactory<T>
      Parameters:
      schema - the schema of the messages to be read
      customizers - the optional list of readers to apply to the reactive message reader builder
      Returns:
      the reactive message reader