Class RecordsProducer


  • public abstract class RecordsProducer
    extends Object
    Class which generates Kafka Connect SourceRecord records.
    Author:
    Horia Chiorean (hchiorea@redhat.com)
    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
      • sourceInfo

        protected final SourceInfo sourceInfo
    • Method Detail

      • start

        protected abstract void start​(BlockingConsumer<ChangeEvent> recordsConsumer,
                                      Consumer<Throwable> failureConsumer)
        Starts up this producer. This is normally done by a PostgresConnectorTask instance. Subclasses should start enqueuing records via a separate thread at the end of this method.
        Parameters:
        recordsConsumer - a consumer of ChangeEvent instances, may not be null
      • commit

        protected abstract void commit​(long lsn)
        Notification that offsets have been committed to Kafka up to the given LSN.
      • stop

        protected abstract void stop()
        Requests that this producer be stopped. This is normally a request coming from a PostgresConnectorTask instance
      • clock

        protected Clock clock()