简体   繁体   English

ClickHouse Kafka Engine可以使用压缩的JSON消息吗?

[英]Can ClickHouse Kafka Engine consume compressed JSON messages?

Can ClickHouse Kafka Engine consume compressed JSON messages from a Kafka topic, using JSONEachRow format? ClickHouse Kafka Engine可以使用JSONEachRow格式使用来自Kafka主题的压缩JSON消息吗?

Will it automatically decompress messages and then apply the JSON parsing? 它会自动解压缩消息,然后应用JSON解析吗? Does it need any special configuration for it? 是否需要任何特殊配置?

EDIT My question is directed to whether compressing topics via set compression configuration on the Kafka topic would make ClickHouse not able to read these messages. 编辑我的问题是针对通过Kafka主题上的设置压缩配置来压缩主题是否会使ClickHouse无法读取这些消息。

Kafka Engine consumes messages as they are - no more, no less. Kafka Engine按原样使用消息-不多也不少。 It's almost the same as reading from native files, with the exception that message boundaries might need special treatments. 它与从本机文件读取几乎相同,但消息边界可能需要特殊处理。 ClickHouse doesn't support reading compressed data files other than native serialized blocks. ClickHouse除了本机序列化块外,不支持读取压缩数据文件。 So the answer is no, it cannot consume compressed JSON messages. 因此答案是否定的,它不能使用压缩的JSON消息。

Yes, as long as the ClickHouse client is able to understand Kafka topic compression. 是的,只要ClickHouse客户端能够理解Kafka主题压缩。 For example, earlier versions won't be able to understand ZStandard compression, but they would understand eg snappy. 例如,较早的版本将无法理解ZStandard压缩,但是他们将能够理解例如snappy。 Whether it's JSON or something else, that's up to the parsing method specified. 无论是JSON还是其他格式,都取决于指定的解析方法。 If these messages are themselves compressed (redundant though) then they will not be parsed correctly, as @Amos says. 如果这些消息本身经过压缩(尽管是冗余的),则它们将无法正确解析,如@Amos所说。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用Kafka-Python的反序列化器从Kafka消耗JSON消息 - Can't Consume JSON Messages From Kafka Using Kafka-Python's Deserializer Clickhouse/Kafka:将 JSON 对象类型读入字段 - Clickhouse/Kafka: reading a JSON Object type into a field 使用 ClickHouse 使用来自 Kafka 的嵌套 JSON 消息 - Consuming nested JSON message from Kafka with ClickHouse 如何通过 Kafka 控制台消费者和生产者使用 JSON 模式消费和生产消息 - How to consume and produce messages with JSON schemas through the Kafka Console Consumer and Producer 在 Talend 中使用 tJava 使用 kafka 主题中的 Json - Consume the Json in kafka topic using tJava in Talend Spring Kafka监听器消费JSON并推断域object - Spring Kafka listener to consume JSON and infer the domain object 有效过滤来自 kafka 消费者的 Json 消息 - filter Json messages from kafka consumer efficiently 使用Logstash grok过滤Kafka JSON消息 - Filter Kafka JSON messages with Logstash grok 如何将Kafka主题中的嵌套Json消息解析为配置单元 - How to parse Nested Json messages from Kafka topic to hive 使用 Logstash 过滤器操作来自 Kafka 主题的 JSON 消息 - Manipulating JSON messages from Kafka topic using Logstash filter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM