类 PushPulsarSource<T>
java.lang.Object
org.apache.pulsar.functions.source.PulsarSource<T>
org.apache.pulsar.functions.source.PushPulsarSource<T>
- 所有已实现的接口:
AutoCloseable,org.apache.pulsar.io.core.Source<T>
- 直接已知子类:
MultiConsumerPulsarSource
-
字段概要
从类继承的字段 org.apache.pulsar.functions.source.PulsarSource
functionClassLoader, properties, pulsarClient, pulsarSourceConfig, topicSchema -
构造器概要
构造器构造器说明PushPulsarSource(org.apache.pulsar.client.api.PulsarClient pulsarClient, PulsarSourceConfig pulsarSourceConfig, Map<String, String> properties, ClassLoader functionClassLoader) -
方法概要
从类继承的方法 org.apache.pulsar.functions.source.PulsarSource
buildPulsarSourceConsumerConfig, buildRecord, createConsumeBuilder, getInputConsumers从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 java.lang.AutoCloseable
close
-
构造器详细资料
-
PushPulsarSource
public PushPulsarSource(org.apache.pulsar.client.api.PulsarClient pulsarClient, PulsarSourceConfig pulsarSourceConfig, Map<String, String> properties, ClassLoader functionClassLoader)
-
-
方法详细资料
-
read
- 抛出:
Exception
-
open
public abstract void open(Map<String, Object> config, org.apache.pulsar.io.core.SourceContext sourceContext) throws ExceptionOpen connector with configuration.- 参数:
config- initialization configsourceContext- environment where the source connector is running- 抛出:
Exception- IO type exceptions when opening a connector
-
consume
Attach a consumer function to this Source. This is invoked by the implementation to pass messages whenever there is data to be pushed to Pulsar.- 参数:
record- next message from source which should be sent to a Pulsar topic
-
getQueueLength
public int getQueueLength()Get length of the queue that records are push onto Users can override this method to customize the queue length- 返回:
- queue length
-