Closed gaecfov closed 2 months ago
The rest API returns binary data response, not JSON. To decode the message, you have to use Pulsar Client API.
Use admin client instead of rest api.
The GUI tool I am developing uses the rest api directly, without the admin client, and I currently do message extraction based on raw data
Search before asking
Read release policy
Version
Pulsar Version:3.3.0 REST API:/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/position/{messagePosition}
Minimal reproduce step
curl --location --request GET '/admin/v2/persistent/public/default/my-topic/subscription/my-sub/position/1‘
What did you expect to see?
Because the messagePosition parameter is set to 1, a message should normally be returned
What did you see instead?
Multiple messages are returned. It looks like one Batch message. How do I parse this message? I need to display this message on the page
Anything else?
No response
Are you willing to submit a PR?