Package com.hazelcast.jet.pulsar
Class PulsarSinkBuilder<E,M>
java.lang.Object
com.hazelcast.jet.pulsar.PulsarSinkBuilder<E,M>
- Type Parameters:
E- the type of stream itemM- the type of the message published byPulsarProducer
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPulsarSinkBuilder(String topic, SupplierEx<org.apache.pulsar.client.api.PulsarClient> connectionSupplier, SupplierEx<org.apache.pulsar.client.api.Schema<M>> schemaSupplier, FunctionEx<? super E, M> extractValueFn) Required fields of Pulsar sink -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates and returns the PulsarSinkwith using builder configurations set before.extractKeyFn(FunctionEx<? super E, String> extractKeyFn) extractPropertiesFn(FunctionEx<? super E, Map<String, String>> extractPropertiesFn) extractTimestampFn(FunctionEx<? super E, Long> extractTimestampFn) preferredLocalParallelism(int preferredLocalParallelism) producerConfig(Map<String, Object> producerConfig)
-
Constructor Details
-
PulsarSinkBuilder
public PulsarSinkBuilder(@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) Required fields of Pulsar sink- Parameters:
topic- Pulsar topic name to publish toconnectionSupplier- Pulsar client supplierextractValueFn- extracts the message value from the emitted items.schemaSupplier- Pulsar messaging schema supplier.
-
-
Method Details
-
producerConfig
- Parameters:
producerConfig- The configurations forPulsarProducer
-
extractKeyFn
- Parameters:
extractKeyFn- extracts the message key from the emitted items.
-
extractPropertiesFn
@Nonnull public PulsarSinkBuilder<E,M> extractPropertiesFn(FunctionEx<? super E, Map<String, String>> extractPropertiesFn) - Parameters:
extractPropertiesFn- extracts the message properties from the emitted items.
-
extractTimestampFn
@Nonnull public PulsarSinkBuilder<E,M> extractTimestampFn(FunctionEx<? super E, Long> extractTimestampFn) - Parameters:
extractTimestampFn- the function that extracts the timestamp from the emitted item.
-
preferredLocalParallelism
-
build
Creates and returns the PulsarSinkwith using builder configurations set before.
-