MirrorMaker 2: Failed to access Avro data from topic

Hello everybody,

I am currently trying to implement MirrorMaker 2 because I want to synchronize topics between to kafka clusters.

I am getting the following Exception:
Caused by: org.apache.kafka.common.config.ConfigException: Failed to access Avro data from topic xxx : Schema being registered is incompatible with an earlier schema for subject “xxx”

The thing is that the topic gets created on the target cluster but there is no data syncronized and there also is no other schema which is identical to the one I am trying to sync.

This is my connector config:
{
“connector.class”: “org.apache.kafka.connect.mirror.MirrorSourceConnector”,
“tasks.max”: 1,
“topics”: “xxx”,
“replication.policy.separator”: “”,
“source.cluster.alias”: “”,
“target.cluster.alias”: “”,
“replication.factor”: 1,
“sync.topic.acls.enabled”: “false”,
“config.storage.replication.factor”: 1,
“status.storage.replication.factor”: 1,
“source.cluster.bootstrap.servers”: “broker:29092”,
“target.cluster.bootstrap.servers”: “broker2:29092”,
“offset-syncs.topic.replication.factor”: 1,
“source.consumer.auto.offset.reset”: “earliest”,
“security.protocol”: “PLAINTEXT”,
“key.converter”: “org.apache.kafka.connect.storage.StringConverter”,
“value.converter”: “io.confluent.connect.avro.AvroConverter”,
“value.converter.schema.registry.url”: “http:/…”,
“schema.registry.url”: “http://…”
}

It would be very kind if somebody could help me

Hello Lara, thank you very much for your answer.

My problem is that I do not have a schema on the target cluster because it does not get created by the connector. Thats the reason why I do not understand the error. How can there be a conflict if no schema for the topic was ever created on the targte side I simply want the connector to copy it from the source cluster.

Do you understand what I mean?

Best regards Julian

MirrorMaker2 should always be configured with ByteArrayConverter class for the key and value