linlinnn edited a comment on pull request #10395:
URL: https://github.com/apache/pulsar/pull/10395#issuecomment-828446106


   > I don't think it is a good change, avro api has checked this. we don't 
need to check this, give it to avro api is better.
   
   @congbobo184 
   Could you point it out please?
   I want to check this during init schema, otherwise will cause the issue that 
send message successfully but failed to consume message.
   ```java
   @Data
   @AllArgsConstructor
   public static class Payload {
       String message;
   }
   
   public static void main(String[] args) {
       AvroSchema<Payload> schema = AvroSchema.of(Payload.class);
       Payload payload = new Payload("test");
       ...
       producer.send(payload); // successfully
       Message<Payload> message = consumer.receive();
       message.getValue();      // exception
   }
   ```
   
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to