Class MongoSource

java.lang.Object
org.apache.pulsar.io.core.PushSource<byte[]>
org.apache.pulsar.io.mongodb.MongoSource
All Implemented Interfaces:
AutoCloseable, org.apache.pulsar.io.core.Source<byte[]>

public class MongoSource extends org.apache.pulsar.io.core.PushSource<byte[]>
The base class for MongoDB sources.
  • Constructor Details

    • MongoSource

      public MongoSource()
    • MongoSource

      public MongoSource(Supplier<com.mongodb.reactivestreams.client.MongoClient> clientProvider)
  • Method Details

    • open

      public void open(Map<String,Object> config, org.apache.pulsar.io.core.SourceContext sourceContext) throws Exception
      Specified by:
      open in interface org.apache.pulsar.io.core.Source<byte[]>
      Specified by:
      open in class org.apache.pulsar.io.core.PushSource<byte[]>
      Throws:
      Exception
    • close

      public void close() throws Exception
      Throws:
      Exception