'Why kafka write null data to the database?

I am working on a nestjs project. My project gets data from Kafka's topic and writes the data to the database (mysql). If I read hundreds of messages from Kafka, most of them can be written to the database correctly. However, some messages can be written to the database with a null value(the database can have that record but with a null value in all columns). Am I missing anything here?



Solution 1:[1]

Sounds like you're missing a filter for null-valued Kafka records.

Ideally, you shouldn't be writing to the database using NestJS, if you are able to run a standalone Kafka Connect process.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 OneCricketeer