Skip to content

[flink] Fix Debezium Avro deserialization for multi topic source#7871

Open
ArnavBalyan wants to merge 1 commit into
apache:masterfrom
ArnavBalyan:arnavb/fix-kafka-debezium-avro-multi-topic
Open

[flink] Fix Debezium Avro deserialization for multi topic source#7871
ArnavBalyan wants to merge 1 commit into
apache:masterfrom
ArnavBalyan:arnavb/fix-kafka-debezium-avro-multi-topic

Conversation

@ArnavBalyan
Copy link
Copy Markdown
Member

@ArnavBalyan ArnavBalyan commented May 15, 2026

Purpose

  • KafkaDebeziumAvroDeserializationSchema returns 1 topic via findOneTopic at init time, this gets reused for every incoming record.
  • With multi topic configs (topic=a;b), any message coming from another topic leads to a crash with SerializationException: The given schema does not match. The same cached topic is also passed into CdcSourceRecord, misrouting records to the wrong table.
  • Read topic from the actual message for deserialize instead of using the cached value at init time.
  • Closes user reported bug [Bug] Kafka Debezium Avro deserialization uses wrong schema subject for multi-topic sources #7859.

Tests

  • Existing UTs

@ArnavBalyan
Copy link
Copy Markdown
Member Author

cc @JingsongLi thanks! :)

@ArnavBalyan
Copy link
Copy Markdown
Member Author

cc @XiaoHongbo-Hope could you PTAL thanks!

@XiaoHongbo-Hope
Copy link
Copy Markdown
Contributor

cc @XiaoHongbo-Hope could you PTAL thanks!

Sure.

@ArnavBalyan
Copy link
Copy Markdown
Member Author

thanks!

@ArnavBalyan
Copy link
Copy Markdown
Member Author

cc @JingsongLi @XiaoHongbo-Hope gentle reminder could PTAL minor bug fix thanks!

@ArnavBalyan
Copy link
Copy Markdown
Member Author

Gentle reminder thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants