GitHub user jlbelmonte created a discussion: How to send protobuf binary data 
via Pulsar REST API?

Hello.
I need to send protobuf messages through Pulsar's HTTP REST API, but I'm 
running into encoding issues that break compatibility with my existing 
consumers.

I have an edge case where I can only use the REST API endpoint to produce a 
message, and my consumers expect raw binary protobuf data.

**What I've Tried:**

* Base64 encoding in JSON payload - Works for sending but consumers receive 
Base64 string, not binary protobuf, so my consumer fails the decoding.
* BYTES schema type - I tried to setup  value schema with type `BYTES` but I 
get `Unable to add schema SchemaData(type=BYTES...`
* STRING schema or no schema - Same issue, consumers still get Base64 string
* Raw bytes in the body with Content-Type application/octet-stream', gets a 415.

**Questions:**

- Is there a way to send binary protobuf data via REST API so consumers receive 
raw bytes?
- Any configuration to make Pulsar automatically decode Base64 payloads before 
delivering to consumers?
- Alternative approaches for HTTP-based binary message production?

**Environment:**
Using Ruby with HTTParty for REST calls
Pulsar broker with JWT authentication
Existing  rust protobuf consumers expecting binary data

Any suggestions would be greatly appreciated!

GitHub link: https://github.com/apache/pulsar/discussions/24776

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to