消息密钥没有传播,到达接收器的消息的密钥等于NULL,值正在到达,好吗?我做错了什么?
以下是已实施的步骤:
来自protobuf格式主题:
打印"protobuf主题">
密钥格式:HOPPING(KAFKA_STRING(或TUMBLING(KAFKA.STRING(值格式:PROTOBUF或KAFKA_STRING赛艇时间:2020/11/19 16:41:24.926 Z,键:[key375c71e9-4095-4ac7-8301-1b4c@4134638929333085540/-],value:内容:";你好世界1";日期时间:"2020-11-19T16:41:23.932842Z";id:";375c71e9-4095-4ac7-8301-1b4c9a031;赛艇时间:2020/11/19 16:41:26.097 Z,键:[keydeeb7023-cc02-482b-a25f-3bc7@7221912747358970420/-],value:内容:";你好世界1";日期时间:"2020-11-19T16:41:26.084065Z";id:";deeb7023-cc02-482b-a25f-3bc7d9caa2b4";
使用(kafka_topic='protobuf-topic',VALUE_FORMAT='protobuf'(创建STREAM protbuf_source
创建STREAM protbuf_STREAM_with_key with(KAFKA_TOPIC='protbuf_tream_with_6key_TOPIC',VALUE_FORMAT='PROTOBUF'(作为SELECT*FROM protbuf_STREAM_source
打印"protbuf_stream_with_key_topic">
密钥格式:_(ツ)_/?-未处理任何数据值格式:PROTOBUF或KAFKA_STRINGrowtime:2020/11/19 16:55:34.786 Z,键:,值:内容:";你好世界1";日期时间:"2020-11-19T16:55:34.190391Z";ID:";65545719-a7c7-4fe6-9c9f-8802fda1de9d";rowtime:2020/11/19 16:55:35.888 Z,键:,值:内容:";你好世界1";日期时间:"2020-11-19T16:55:35.875058Z";ID:";5f796254-721d-484f-8759-2bc66f193e5a";rowtime:2020/11/19 16:55:36.921 Z,键:,值:内容:";你好世界1";日期时间:"2020-11-19T16:55:36.912333Z";ID:";4e1ea81b-09dd-43c3-8f92-ea4275eeb17";
流源的创建从一开始就存在错误
使用(kafka_topic=‘protobuf-topic’,VALUE_FORMAT=‘protobuf’(创建STREAM protbuf_STREAM_source>gt;将创建密钥为空的流
要从主题中获取密钥,必须在创建命令中声明密钥:
使用(kafka_topic='protobuf-topic',VALUE_FORMAT='protobuf'(创建STREAM protbuf_source(密钥VARCHAR key(;