问题一:
消息是一个json串,如:
{
"user_id":6,
"name":"Alexander",
"age":60,
"time": 1754555721
}
以上消息消费会报错,错误信息如下:
Reason: Parse json data for JsonDoc failed. code: 4, error info: Missing a name for object member.. src line [{];
Reason: Parse json data for JsonDoc failed. code: 2, error info: The document root must not be followed by other values.. src line [ "user_id":5,"];
Reason: Parse json data for JsonDoc failed. code: 3, error info: Invalid value.. src line [ name":"Alexander",];
Reason: Parse json data for JsonDoc failed. code: 2, error info: The document root must not be followed by other values.. src line [ "age":60,"];
Reason: Parse json data for JsonDoc failed. code: 3, error info: Invalid value.. src line [ time": 1754555720];
Reason: Parse json data for JsonDoc failed. code: 3, error info: Invalid value.. src line [}];
但同样的内容,把换行去掉,改成:
{"user_id":6,"name":"Alexander","age":60,"time": 1754555721}
则消费成功。
问题二:
{"user_id":6,"name":"Alexander","age":60,"time": 1754555721}这个消息插入doris后发现time字段为空,doris中time字段为datetime类型。