BewareMyPower commented on code in PR #139: URL: https://github.com/apache/pulsar-client-cpp/pull/139#discussion_r1050508144
########## test-conf/standalone-ssl.conf: ########## @@ -50,6 +50,9 @@ brokerShutdownTimeoutMs=3000 # Enable backlog quota check. Enforces action on topic when the quota is reached backlogQuotaCheckEnabled=true +# Disable schema validation: If a producer doesn’t carry a schema, the producer is allowed to connect to the topic and produce data. +isSchemaValidationEnforced=true + Review Comment: IMO, currently we don't need to handle this case. The default value of `isSchemaValidationEnforced` is false. I think you can continue the work of https://github.com/apache/pulsar-client-cpp/pull/142, but the goal is not supporting auto produce schema. Because C++ client only interacts with `SchemaInfo`, while `AutoProduceBytesSchema` is a `Schema<byte[]>`. I have an idea that we can add an option to download the latest schema info when creating producers without schema. e.g. ``` // it should only work for the case when isSchemaValidationEnforced is true producerConf.setAutoDownloadSchema(true); ``` Regarding the message validation, users should still perform the message validation by themselves. From the discussion [here](https://lists.apache.org/thread/2gbftzs7xwvvddythn818bor17rqpd4m), we can see Java client does not validate the message in `sendAsync`. Instead, it validates the message in `TypedMessageBuilder#value`. There is no corresponding concept in the C++ client. -- 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]
