shibd commented on code in PR #257:
URL: https://github.com/apache/pulsar-client-cpp/pull/257#discussion_r1178056562
##########
include/pulsar/Client.h:
##########
@@ -404,6 +404,19 @@ class PULSAR_PUBLIC Client {
*/
uint64_t getNumberOfConsumers();
+ /**
+ * Asynchronously get the SchemaInfo of a topic and a specific version.
+ *
+ * @topic the topic name
+ * @version the schema version byte array, see
Message::getLongSchemaVersion.
Review Comment:
This note does not match the parameter type.
##########
include/pulsar/Message.h:
##########
@@ -177,7 +177,14 @@ class PULSAR_PUBLIC Message {
bool hasSchemaVersion() const;
/**
- * Get the schema version
+ * Get the schema version.
+ *
+ * @return the the schema version on success or -1 if the message does not
have the schema version
+ */
+ int64_t getLongSchemaVersion() const;
Review Comment:
For the Java client, it returns a bytes array. This may be a consensus that
is already acceptable to users, is it necessary for us to change it to int?
##########
include/pulsar/Client.h:
##########
@@ -404,6 +404,19 @@ class PULSAR_PUBLIC Client {
*/
uint64_t getNumberOfConsumers();
+ /**
+ * Asynchronously get the SchemaInfo of a topic and a specific version.
+ *
+ * @topic the topic name
+ * @version the schema version byte array, see
Message::getLongSchemaVersion.
+ * @callback the callback that is triggered when the SchemaInfo is
retrieved successfully or not.
+ *
+ * NOTE: If there is no schema registered or the given version does not
exist, a SchemaInfo whose type is
Review Comment:
I think we can add a new `Result` : `TopicSchemaNotFound`
When schema is not found, the Result on the callback is
`TopicSchemaNotFound`.
What do you think?
--
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]