I'm building a POC application using the event outbox pattern layed out in :
I'm using confluent platform 5.4.1 installed with the confluent CLI and debezium-connector-postgres-1.1.0 installed with the confluent-hub CLI
I've followed the following documentation pages to setup the connector with the outbox SMT:
I have the following connector configuration :
The connector succesfully picks up events from the outbox table in postgreSQL and writes the events to kafka in the appropriate topic.
I am able to consume and deserialize the event with the schema automatically registered by debezium in the avro registry.
However the kafka connect value schema looks like :
I don't understand why it's using the name ConnectDefault and the namespace io.confluent.connect.avro. Isn't it supposed to use the namespace as specified in the config config database.server.name as specified in the documentation ?
The use of the default io.confluent namespace is rather problematic because when you generate Java classes on the consumer side using the avro-maven-plugin, all schemas for all outbox SMT topics have the same name and namespace so it results in generating a single Java class instead of one per topic. So when using the kafka consumer config specific.avro.reader = true it won't work if multiple diffrent generated classes as ConnectDefault have collided and resulted in a single class that marches the actual schema for some of the topics. It is also problematic just for the sake of using the name and namespace field for what they were intended to.
The expected outcome would be that debezium register schemas in the registry with the proper name and namespace taken from the database.server.name and aggregate type or something similar right ?
> The logical name of the PostgreSQL server/cluster, which forms a namespace and is used in all the names of the Kafka topics to which the connector writes, the Kafka Connect schema names, and the namespaces of the corresponding Avro schema when the Avro Connector is used.