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