接口 KafkaProduceSender<K,​V>

    • 方法详细资料

      • send

        void send​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> producerRecord)
        Send data to kafka.
        参数:
        producerRecord - data to send
      • beginTransaction

        void beginTransaction​(String transactionId)
      • prepareCommit

        Optional<KafkaCommitInfo> prepareCommit()
        Prepare a transaction commit.
        返回:
        commit info, or empty if no commit is needed.
      • abortTransaction

        void abortTransaction()
        Abort the current transaction.
      • abortTransaction

        void abortTransaction​(long checkpointId)
        Abort the given transaction.
        参数:
        checkpointId - the id of the last checkpoint of the last run
      • snapshotState

        List<KafkaSinkState> snapshotState​(long checkpointId)
        Get the current kafka state of the sender.
        返回:
        kafka state List, or empty if no state is available.