@PublicEvolving
public interface PulsarContextAware<T>
extends org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>
dynamicPulsarSerializationSchema that need information
about the context where the Pulsar Producer is running along with information about the available
partitions.
You only need to override the methods for the information that you need. However, getTargetTopic(Object) is required because it is used to determine the available partitions.
| Modifier and Type | Method and Description |
|---|---|
org.apache.pulsar.client.api.Schema<T> |
getSchema() |
default Optional<String> |
getTargetTopic(T element)
Returns the topic that the presented element should be sent to.
|
default void |
setNumParallelInstances(int numParallelInstances)
Sets the parallelism with which the parallel task of the Pulsar Sink runs.
|
default void |
setParallelInstanceId(int parallelInstanceId)
Sets the number of the parallel subtask that the Pulsar Sink is running on.
|
default Optional<String> getTargetTopic(T element)
default void setParallelInstanceId(int parallelInstanceId)
setNumParallelInstances(int)).default void setNumParallelInstances(int numParallelInstances)
org.apache.pulsar.client.api.Schema<T> getSchema()
Copyright © 2019–2021 The Apache Software Foundation. All rights reserved.