Multiple Event Types in the Same Kafka Topic - Revisited
Jul 8, 2020Robert Yokota

Summary
This post revisits the topic of multiple event types in the same Kafka topic, presenting schema references as an alternative to Avro unions or newer subject name strategies (RecordNameStrategy, TopicRecordNameStrategy). It details how schema references work with Avro, JSON Schema, and Protobuf, including necessary serializer configurations (auto.register.schemas=false, use.latest.version=true) for Avro and JSON Schema when using unions. It also highlights the automatic registration capabilities for Protobuf when schemas are wrapped in a message, and the manual registration requirements for Avro and JSON Schema.