Class DefaultReactivePulsarConsumerFactory<T>

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

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

    • DefaultReactivePulsarConsumerFactory

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

    • createConsumer

      public org.apache.pulsar.reactive.client.api.ReactiveMessageConsumer<T> createConsumer(org.apache.pulsar.client.api.Schema<T> schema)
      Description copied from interface: ReactivePulsarConsumerFactory
      Create a reactive message consumer.
      Specified by:
      createConsumer in interface ReactivePulsarConsumerFactory<T>
      Parameters:
      schema - the schema of the messages to be consumed
      Returns:
      the reactive message consumer
    • createConsumer

      public org.apache.pulsar.reactive.client.api.ReactiveMessageConsumer<T> createConsumer(org.apache.pulsar.client.api.Schema<T> schema, List<ReactiveMessageConsumerBuilderCustomizer<T>> customizers)
      Description copied from interface: ReactivePulsarConsumerFactory
      Create a reactive message consumer.
      Specified by:
      createConsumer in interface ReactivePulsarConsumerFactory<T>
      Parameters:
      schema - the schema of the messages to be consumed
      customizers - the optional list of customizers to apply to the reactive message consumer builder
      Returns:
      the reactive message consumer