Class PulsarSinks

java.lang.Object
com.hazelcast.jet.pulsar.PulsarSinks

public final class PulsarSinks extends Object
Contains factory methods for Pulsar sinks.
Since:
6.0
  • Method Details

    • builder

      @Nonnull public static <E, M> PulsarSinkBuilder<E,M> builder(@Nonnull String topic, @Nonnull SupplierEx<org.apache.pulsar.client.api.PulsarClient> connectionSupplier, @Nonnull SupplierEx<org.apache.pulsar.client.api.Schema<M>> schemaSupplier, @Nonnull FunctionEx<? super E,M> extractValueFn)
      Returns a builder object that offers a step-by-step fluent API to build a custom Pulsar Sink for the Pipeline API.
      Type Parameters:
      E - the type of stream items that sink accepts
      M - the type of the message published by PulsarProducer
      Parameters:
      topic - Pulsar topic name to publish to
      connectionSupplier - Pulsar client supplier
      extractValueFn - extracts the message value from the emitted items.
      schemaSupplier - Pulsar messaging schema supplier.
      Since:
      6.0
    • pulsarSink

      @Nonnull public static <E, M> Sink<E> pulsarSink(@Nonnull String topic, @Nonnull SupplierEx<org.apache.pulsar.client.api.PulsarClient> connectionSupplier, @Nonnull SupplierEx<org.apache.pulsar.client.api.Schema<M>> schemaSupplier, @Nonnull FunctionEx<? super E,M> extractValueFn)
      Convenience for builder(String, SupplierEx, SupplierEx, FunctionEx). It creates a basic Pulsar sink that connect the topic.
      Type Parameters:
      E - the type of stream items that sink accepts
      M - the type of the message published by PulsarProducer
      Parameters:
      topic - Pulsar topic name to publish to
      connectionSupplier - Pulsar client supplier
      schemaSupplier - extracts the message value from the emitted items.
      extractValueFn - Pulsar messaging schema supplier.
      Since:
      6.0