[Bug] [geo-replication] Failed to create remote producer (org.apache.avro.AvroRuntimeException: Not a record: "string")
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
2.9.2 and above versions
### Minimal reproduce step
1、create topic [test-tenant/test-ns/test-topic] in cluster-1 and cluster-2
2、send message by producer use Schema.JSON(String.class) in cluster-1
`Producer producer = client.newProducer(Schema.JSON(String.class)).topic("test-tenant/test-ns/test-topic").create();`
3、start geo-replication from cluster-2 to cluster-1
4、We will encounter the following exception in cluster-2 broker log

### What did you expect to see?
No exceptions and geo-replicator working normally.
### What did you see instead?
Encountered an exception and was unable to normal work.
### Anything else?
These two questions are similar: https://github.com/apache/pulsar/issues/21241
In AbstractReplicator class, a possible solution is to replace Schema.AUTO_PRODUCE_BYTES() with Schema.BYTES?
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Contributor guide
Assessment
This issue has not been assessed yet.