Class PulsarReaderBuilder<M,T>

java.lang.Object
com.hazelcast.jet.pulsar.PulsarReaderBuilder<M,T>
Type Parameters:
M - the type of the message read by pulsarReader
T - the type of data emitted from StreamSource
All Implemented Interfaces:
Serializable

public final class PulsarReaderBuilder<M,T> extends Object implements Serializable
See Also:
  • Constructor Details

    • PulsarReaderBuilder

      public PulsarReaderBuilder(@Nonnull String topic, @Nonnull SupplierEx<org.apache.pulsar.client.api.PulsarClient> connectionSupplier, @Nonnull SupplierEx<org.apache.pulsar.client.api.Schema<M>> schemaSupplier, @Nonnull FunctionEx<org.apache.pulsar.client.api.Message<M>,T> projectionFn)
      Required fields of Pulsar reader
      Parameters:
      topic - Pulsar topic name to consume from
      connectionSupplier - Pulsar client supplier
      schemaSupplier - Pulsar messaging schema supplier.
      projectionFn - converts a Pulsar message to an emitted item.
  • Method Details

    • readerConfig

      @Nonnull public PulsarReaderBuilder<M,T> readerConfig(@Nonnull Map<String,Object> readerConfig)
      Parameters:
      readerConfig - Pulsar reader configurations that must contain reader name
    • build

      @Nonnull public StreamSource<T> build()
      Creates and returns the Pulsar Reader StreamSource with using builder configurations set before.