BewareMyPower commented on code in PR #257:
URL: https://github.com/apache/pulsar-client-cpp/pull/257#discussion_r1178548743


##########
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:
   In Java client, the `TopicNotFound` error is ignored and an empty optional 
of `SchemaInfo` is returned. So I thought it should not be treated as an 
exceptional case and users should process this error. I just use a `NONE` 
schema to replace an empty optional.
   
   But I just thought again and IMO an error should be returned if we cannot 
get the schema for the given topic and version. So I will adopt the suggestion 
you made so that users should not handle the schema type.



-- 
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]

Reply via email to