munir131 opened a new issue #8696:
URL: https://github.com/apache/pulsar/issues/8696


   **Is your enhancement request related to a problem? Please describe.**
   As per pulsar documentation,  
   ```
   In payload commands, the protobuf command data is followed by protobuf 
metadata and then the payload, which is passed in a raw format outside of 
protobuf.
   ```
   There is no easy way to extract payload from response of 
https://pulsar.apache.org/admin-rest-api/?version=2.6.2&apiversion=v2#operation/peekNthMessage
 endpoint.
   
   **Describe the solution you'd like**
   Ideally, peek should only return the payload without protobuf 
headers/commands. Alternatively, respond with a custom JSON response that 
contains parsed metadata and the payload separately.
   There are a few more alternatives like below:
   1. Respect `Accept` header and avoid protobuf in REST API and return JSON 
formatted payload and metadata(properties)
   2. Add a separator between metadata and payload so that payload can be 
parsed.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to