Package com.hazelcast.jet.pulsar
Class PulsarSinks
java.lang.Object
com.hazelcast.jet.pulsar.PulsarSinks
Contains factory methods for Pulsar sinks.
- Since:
- 6.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E,M> PulsarSinkBuilder<E, M> builder(String topic, SupplierEx<org.apache.pulsar.client.api.PulsarClient> connectionSupplier, SupplierEx<org.apache.pulsar.client.api.Schema<M>> schemaSupplier, FunctionEx<? super E, M> extractValueFn) Returns a builder object that offers a step-by-step fluent API to build a custom PulsarSinkfor the Pipeline API.static <E,M> Sink<E> pulsarSink(String topic, SupplierEx<org.apache.pulsar.client.api.PulsarClient> connectionSupplier, SupplierEx<org.apache.pulsar.client.api.Schema<M>> schemaSupplier, FunctionEx<? super E, M> extractValueFn) Convenience forbuilder(String, SupplierEx, SupplierEx, FunctionEx).
-
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 PulsarSinkfor the Pipeline API.- Type Parameters:
E- the type of stream items that sink acceptsM- the type of the message published byPulsarProducer- Parameters:
topic- Pulsar topic name to publish toconnectionSupplier- Pulsar client supplierextractValueFn- 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 forbuilder(String, SupplierEx, SupplierEx, FunctionEx). It creates a basic Pulsar sink that connect the topic.- Type Parameters:
E- the type of stream items that sink acceptsM- the type of the message published byPulsarProducer- Parameters:
topic- Pulsar topic name to publish toconnectionSupplier- Pulsar client supplierschemaSupplier- extracts the message value from the emitted items.extractValueFn- Pulsar messaging schema supplier.- Since:
- 6.0
-