Description
redis sink: complex protobuf data type values not getting synced properly
Steps To Reproduce
- REDIS SINK
- With config INPUT_SCHEMA_PROTO_TO_COLUMN_MAPPING: {"2":"topics"}
- With config SINK_REDIS_KEY_TEMPLATE: patch-subscription:%s,customer_name
- With protobuf message as
message TestBookingLogMessage { string customer_name = 1; message TopicMetadata { string topic = 1; int32 qos = 2; } repeated TopicMetadata topics = 2;
Expected behavior
""[{"topic":"world/pns/1/com.hello.owl/701483858/3ac6a577fbd334b4","qos":1}]""
Additional context
"[topic: "world/pns/1/com.hello.owl/701483858/3ac6a577fbd334b4"\nqos: 1\n]"
Proposed Fix.
Use JsonPrinter in ProtoOdpfParsedMessage.getFieldByName()