[Bug] Pulsar Rest API: Getting a 500 concurrent.ExecutionException: SchemaException: Unable to add schema
- 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.
### Read release policy
- [x] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### Version
version 3.0.x
### Minimal reproduce step
Trying to use the broker REST endpoint found in the documentation to produce a message
brokerUrl:{8080/8081}/topics/{persistent/non-persistent}/{my-tenant}/{my-namespace}/{my-topic}
### What did you expect to see?
successful response with mesagePublishResults
### What did you see instead?
"reason": "Fail to publish message:java.util.concurrent.ExecutionException: org.apache.pulsar.broker.service.schema.exceptions.SchemaException: Unable to add schema SchemaData(type=STRING, isDeleted=false, timestamp=1741032909189, user=Rest Producer, data=[], props={__charset=UTF-8}) to topic persistent://tenant/namespace/topic"
### Anything else?
There is no schema attached to the topic, so not sure why it would be giving such an error
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
Contributor guide
Research direction
Start by reproducing the failure on Pulsar 3.0.x using the documented broker REST endpoint and the persistent topic form described in the issue. Compare the REST publish request's schema handling with the reported SchemaException; done means the endpoint returns successful messagePublishResults without the schema error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100