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,8 +358,9 @@ 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
|
||||||
return std::make_shared<ReadBufferFromMemory>(data, size);
|
if (data)
|
||||||
|
return std::make_shared<ReadBufferFromMemory>(data, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user