gaoran10 commented on code in PR #20627:
URL: https://github.com/apache/pulsar/pull/20627#discussion_r1271885452
##########
pip/pip-279.md:
##########
@@ -0,0 +1,24 @@
+# Motivation
+
+reformat property,for a http header name cannot contain the following
prohibited characters: =,;: \t\r\n\v\f
+
+for example:
+{"city=shanghai":"tag"}
+when we run `bin/pulsar-admin topics get-message-by-id `, it will throw
exception, the exception is:
+`Reason: java.util.concurrent.CompletionException:
org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector$RetryException:
Could not complete the operation. Number of retries has been exhausted. Failed
reason: a header name cannot contain the following prohibited characters: =,;:
\t\r\n\v\f: =`
+
+# High Level Design
+
+In master branch,
+in an http
request:getMessageById("/{tenant}/{namespace}/{topic}/ledger/{ledgerId}/entry/{entryId}"),
+replace `"X-Pulsar-PROPERTY-" + msgProperties.getKey()` with
`"X-Pulsar-PROPERTY"`
Review Comment:
Could we add an example for this change? Such as this (inaccurate)
```
// message properties
a = value-a
b = value-b
// old response
header: {
"X-Pulsar-PROPERTY-a": "value-a",
"X-Pulsar-PROPERTY-b": "value-b",
}
// new response
header = {
"X-Pulsar-PROPERTY": "{'a': 'value-a', 'b': 'value-b'}"
}
```
--
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]