Handle kafka null messages

This commit is contained in:
János Benjamin Antal 2024-08-07 13:30:28 +00:00
parent b3c30b05d6
commit ac5aab1758

View File

@ -358,7 +358,8 @@ ReadBufferPtr KafkaConsumer2::getNextMessage()
size_t size = current->get_payload().get_size();
++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);
}