mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Handle kafka null messages
This commit is contained in:
parent
b3c30b05d6
commit
ac5aab1758
@ -358,7 +358,8 @@ ReadBufferPtr KafkaConsumer2::getNextMessage()
|
|||||||
size_t size = current->get_payload().get_size();
|
size_t size = current->get_payload().get_size();
|
||||||
++current;
|
++current;
|
||||||
|
|
||||||
chassert(data != nullptr);
|
// `data` can be nullptr on case of the Kafka message has empty payload
|
||||||
|
if (data)
|
||||||
return std::make_shared<ReadBufferFromMemory>(data, size);
|
return std::make_shared<ReadBufferFromMemory>(data, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user