Interface RecordCollector

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Close the internal Producer.
      void flush()
      Flush the internal Producer.
      void init​(org.apache.kafka.clients.producer.Producer<byte[],​byte[]> producer)
      Initialize the collector with a producer.
      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)
      • init

        void init​(org.apache.kafka.clients.producer.Producer<byte[],​byte[]> producer)
        Initialize the collector with a producer.
        Parameters:
        producer - the producer that should be used by this collector
      • flush

        void flush()
        Flush the internal Producer.
      • close

        void close()
        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:
        the map from TopicPartition to offset