Rion Williams
03/19/2023, 4:02 AMRion Williams
03/19/2023, 4:19 AMsap1ens
03/19/2023, 3:36 PMThe problem here is that the shape of the data can vary wildly and dynamically.I’d still try to use schematized events here, e.g. with Avro (unless you’re talking about millions of potential schemas). So on the producer side, create a schema for each type of event, register it in the schema registry, etc. On the consumer side (Flink) you can deserialize it into Avro’s GenericRecords and then decide how to process them depending on the present fields, etc.
Rion Williams
03/19/2023, 3:42 PMRion Williams
03/19/2023, 3:43 PMRion Williams
03/19/2023, 3:43 PMRion Williams
03/19/2023, 3:45 PMsap1ens
03/19/2023, 3:54 PMthis specific application doesn’t have any control over the topic that is being written to. It has a large (unknown number) of producers that each have their own shape and a few guaranteed similar fields that just come into the topic as JSON strings.I don’t think that writing to a certain topic is relevant here. But I think cleaning up the producers and adding more structure there will benefit you more long-term.
Rion Williams
03/19/2023, 4:11 PMRion Williams
03/19/2023, 5:19 PMAnshum Verma
03/20/2023, 2:04 PM