Interface StreamDataProducer


  • public interface StreamDataProducer
    StreamDataProducer is the interface for stream data sources. E.g. KafkaDataProducer.
    • Method Detail

      • produce

        void produce​(String topic,
                     byte[] payload)
      • produce

        void produce​(String topic,
                     byte[] key,
                     byte[] payload)
      • produce

        default void produce​(String topic,
                             byte[] key,
                             byte[] payload,
                             GenericRow headers)
      • close

        void close()
      • produceBatch

        default void produceBatch​(String topic,
                                  List<byte[]> rows)
        Allows the producer to optimize for a batched write. This will help increase throughput in some cases
        Parameters:
        topic - the topic of the output
        rows - the rows
      • produceKeyedBatch

        default void produceKeyedBatch​(String topic,
                                       List<StreamDataProducer.RowWithKey> payloadWithKey,
                                       boolean includeHeaders)
        Allows the producer to optimize for a batched write. This will help increase throughput in some cases
        Parameters:
        topic - the topic of the output
        payloadWithKey - the payload rows with key