Interface RecordCollector

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void closeClean()
      Clean close the internal Producer.
      void closeDirty()
      Dirty close the internal Producer.
      void flush()
      Flush the internal Producer.
      void initialize()
      Initialize the internal Producer; note this function should be made idempotent
      java.util.Map<org.apache.kafka.common.TopicPartition,​java.lang.Long> offsets()
      The last acked offsets from the internal Producer.
      <K,​V>
      void
      send​(java.lang.String topic, K key, V value, org.apache.kafka.common.header.Headers headers, java.lang.Integer partition, java.lang.Long timestamp, org.apache.kafka.common.serialization.Serializer<K> keySerializer, org.apache.kafka.common.serialization.Serializer<V> valueSerializer)  
      <K,​V>
      void
      send​(java.lang.String topic, K key, V value, org.apache.kafka.common.header.Headers headers, java.lang.Long timestamp, org.apache.kafka.common.serialization.Serializer<K> keySerializer, org.apache.kafka.common.serialization.Serializer<V> valueSerializer, StreamPartitioner<? super K,​? super V> partitioner)  
    • Method Detail

      • send

        <K,​V> void send​(java.lang.String topic,
                              K key,
                              V value,
                              org.apache.kafka.common.header.Headers headers,
                              java.lang.Integer partition,
                              java.lang.Long timestamp,
                              org.apache.kafka.common.serialization.Serializer<K> keySerializer,
                              org.apache.kafka.common.serialization.Serializer<V> valueSerializer)
      • send

        <K,​V> void send​(java.lang.String topic,
                              K key,
                              V value,
                              org.apache.kafka.common.header.Headers headers,
                              java.lang.Long timestamp,
                              org.apache.kafka.common.serialization.Serializer<K> keySerializer,
                              org.apache.kafka.common.serialization.Serializer<V> valueSerializer,
                              StreamPartitioner<? super K,​? super V> partitioner)
      • initialize

        void initialize()
        Initialize the internal Producer; note this function should be made idempotent
        Throws:
        org.apache.kafka.common.errors.TimeoutException - if producer initializing txn id timed out
      • flush

        void flush()
        Flush the internal Producer.
      • closeClean

        void closeClean()
        Clean close the internal Producer.
      • closeDirty

        void closeDirty()
        Dirty close the internal Producer.
      • offsets

        java.util.Map<org.apache.kafka.common.TopicPartition,​java.lang.Long> offsets()
        The last acked offsets from the internal Producer.
        Returns:
        an immutable map from TopicPartition to offset