You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/21 12:54:51 UTC
[GitHub] [pulsar] shibd commented on a diff in pull request #17125: [improve][client c++] Support KeyValue Schema.
shibd commented on code in PR #17125:
URL: https://github.com/apache/pulsar/pull/17125#discussion_r976470331
##########
pulsar-client-cpp/include/pulsar/Schema.h:
##########
@@ -27,6 +27,27 @@
namespace pulsar {
+/**
+ * Encoding types of supported KeyValueSchema for Pulsar messages.
+ */
+enum class KeyValueEncodingType
+{
+ /**
+ * Key is stored as message key, while value is stored as message payload.
+ */
+ SEPARATED,
+
+ /**
+ * Key and value are stored as message payload.
+ */
+ INLINE
+};
+
+// Return string representation of result code
+PULSAR_PUBLIC const char *strEncodingType(pulsar::KeyValueEncodingType encodingType);
+
+PULSAR_PUBLIC const KeyValueEncodingType enumEncodingType(std::string encodingTypeStr);
Review Comment:
This method is useful if the user configures the coding type externally. (Exposed to enhance the conversion of C++ enums and strings).
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org