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 2021/07/20 03:24:12 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #11303: [tools] Pulsar Client: add ability to produce KV messages

sijie commented on a change in pull request #11303:
URL: https://github.com/apache/pulsar/pull/11303#discussion_r672778409



##########
File path: pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/CmdProduce.java
##########
@@ -114,6 +120,15 @@
     @Parameter(names = { "-k", "--key"}, description = "message key to add ")
     private String key;
 
+    @Parameter(names = { "-vs", "--value-schema"}, description = "Schema type (can be bytes,avro,json,string...)")
+    private String valueSchema = "bytes";
+
+    @Parameter(names = { "-ks", "--key-schema"}, description = "Schema type (can be bytes,avro,json,string...)")
+    private String keySchema = "string";
+
+    @Parameter(names = { "-kvet", "--key-value-encoding-type"}, description = "Key Value Encoding Type (can be none,separated,inline)")
+    private String keyValueEncodingType = "none";

Review comment:
       I don't think we should introduce `none` here. The default value should be set to be `null`. If `keyValueEncodingType` is not specified, you can still use the keySchema to serialize the key to `bytes` and use `keyBytes` to set the key. 




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