Using explicit Avro schema with Outbox router

156 views
Skip to first unread message

Hugo EPICIER

unread,
Oct 4, 2022, 4:23:33 AM10/4/22
to debezium
Hello,

I was wondering if there is any way to tell Debezium to use a schema already registered in the schema registry for producing events from the outbox router ?

Contrary to capturing CDC events on table, with the outbox pattern developers would prefer having the ownership on the schema, instead of letting Debezium infering it ?

Thanks for your insights

jiri.p...@gmail.com

unread,
Oct 5, 2022, 3:58:33 AM10/5/22
to debezium
Hi,

how would you then ensure that the schema is inline with the message structure? Is your idea to have a fixed schema name configured in the outbox that would be used? Also do you use Confluent's schema registry or apicurio as this also requires functionality available on the Avro converter side.

J.

Hugo EPICIER

unread,
Oct 5, 2022, 4:11:40 AM10/5/22
to debezium
Hi !
So from your question I understand this is not possible yet, right ?
Yes for example this could take the form of a dedicated column in the outbox table, containing more probably the unique ID of the schema registered in the SR.
We're using the Confluent SR

Hugo EPICIER

unread,
Oct 5, 2022, 4:13:04 AM10/5/22
to debezium
The registration process in this situation should probably be out of scope of Debezium that should just raise an error if the schema ID in the outbox table isn't matched with the SR

jiri.p...@gmail.com

unread,
Oct 6, 2022, 12:57:36 AM10/6/22
to debezium
Hi,

yes this is not possible but it should not be too difficult to implement. IIUC then it would be just enough to rite an SMT that will change the name of the schema according to your needs. The converter then should take care of everything.

J.

Hugo EPICIER

unread,
Oct 6, 2022, 2:47:06 AM10/6/22
to debe...@googlegroups.com
Hi !
Thanks for confirming ! Should I open a feature request in this case ?

--
You received this message because you are subscribed to a topic in the Google Groups "debezium" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/debezium/bD-TZ3RsMdY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/63fee617-668a-46a3-9251-671a5d813c45n%40googlegroups.com.

jiri.p...@gmail.com

unread,
Oct 10, 2022, 1:10:03 AM10/10/22
to debezium
You can but please first take a look at the existing SMTs (not only those provided by Debezium) you might find a one that does what you are looking for.

J.

Reply all
Reply to author
Forward
0 new messages