Confluent Replicator configure schema registry for same cluster replication

582 Views Asked by At

We have one environment with 2 clusters - dev and prod.

We use replicator to migrate a subset of topics from prod to dev.

Now the problem is that since both clusters/brokers are in the same cluster, they share the same schema registry.

I don't know how to correctly configure replicator in this case, and by default it's doing us a disservice by overriding the schemas like so: enter image description here

My replicator workers are pointed to the same source and target schema registry(producer and consumer configs):

schema.registry.url=https://xxx-xxxx.westeurope.azure.confluent.cloud

but have different API keys for producers and consumers.

1

There are 1 best solutions below

0
On

There are multiple ways to configure things for Replicator. Some properties can be provided at Connect worker level, some can be provided or overridden in Replicator config, and yet some others can be places in --consumer.config and --producer.config files.

What I thought is that SR/Avro configurations in --consumer.config and --producer.config files suffice. But it seems that Replicator needs those configs separately in the properties specified in the docs. So I ended up specifying the following in --replication.config:

schema.registry.client.basic.auth.credentials.source=USER_INFO
schema.registry.url={{ .value.schemaRegistry.url }}
schema.registry.client.basic.auth.user.info={{ .value.schemaRegistry.apiKey }}:{{ .value.schemaRegistry.apiSecret }}

There's another document that states that converter properties should be provided as well, but for now it seems to work correctly without them: enter image description here