codelipenghui commented on issue #17947: URL: https://github.com/apache/pulsar/issues/17947#issuecomment-1286305600
> Regarding batched messages, @codelipenghui after testing and investigation, I agree that it's too complex to support in the admin API. I believe we should return 501 Not Implemented if the entry read is batched. > In case the message is encrypted, we should return 400 code stating encrypted message cannot be returned in readable form. It's ok for the encrypted message. And also it is impossible for the broker. For the batch message. This should be a very common use case for users. The Pulsar Client enabled batch by default. If users use multiple threads or the async API to send messages, the batched message will write into the topic. This could be a difficult decision for the user, disable the batch or do not peek message. And we need to provide consistent behavior to users. Suppose a topic contains batched messages and non-batched messages. The peek message with JSON format will work for a while and not work for a while. IMO, If the human-readable message for the peek API will provide significant value. I have no objection for supporting it for the admin API, maybe we can try to minimize duplicate code. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
