apache / apache/pulsar

[Bug] [geo-replication] Failed to create remote producer (org.apache.avro.AvroRuntimeException: Not a record: "string")

Open
#21,242 1 comment 0 reactions 1 assignee Claimed by @hanmz View on GitHub
Stale type/bug
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
![image](https://github.com/apache/pulsar/assets/16524922/676fc919-0d5e-400e-971f-f3c3f90035d4)

### 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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.