类 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

public abstract class PushPulsarSource<T> extends PulsarSource<T>
  • 构造器详细资料

  • 方法详细资料

    • read

      public org.apache.pulsar.functions.api.Record<T> read() throws Exception
      抛出:
      Exception
    • open

      public abstract void open(Map<String,Object> config, org.apache.pulsar.io.core.SourceContext sourceContext) throws Exception
      Open connector with configuration.
      参数:
      config - initialization config
      sourceContext - environment where the source connector is running
      抛出:
      Exception - IO type exceptions when opening a connector
    • consume

      public void consume(org.apache.pulsar.functions.api.Record<T> record)
      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