codelipenghui commented on code in PR #25437:
URL: https://github.com/apache/pulsar/pull/25437#discussion_r3013309234
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java:
##########
@@ -2021,6 +2022,16 @@ public CompletableFuture<Void> connectionOpened(final
ClientCnx cnx) {
return null;
}
+ if (cause instanceof
PulsarClientException.IncompatibleSchemaException
+ && schema instanceof AutoProduceBytesSchema
autoProduceBytesSchema
+ && !autoProduceBytesSchema.hasUserProvidedSchema()) {
+ client.reloadSchemaForAutoProduceProducer(topic,
autoProduceBytesSchema)
+ .whenComplete((__, throwable) -> {
+ future.completeExceptionally(cause);
+ });
+ return null;
+ }
Review Comment:
Will this impact the producer with auto produce schema created by user? As I
understand only replicator can refresh the schema, but user will specify the
schema. Will it cause infinite loop with IncompatibleSchemaException?
--
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]