#pragma once #include #include #include namespace DB { class KafkaBlockOutputStream : public IBlockOutputStream { public: explicit KafkaBlockOutputStream(StorageKafka & storage_, const Context & context_); Block getHeader() const override; void writePrefix() override; void write(const Block & block) override; void writeSuffix() override; void flush() override; private: StorageKafka & storage; Context context; ProducerBufferPtr buffer; BlockOutputStreamPtr child; }; }