nodece commented on issue #8429:
URL: https://github.com/apache/pulsar/issues/8429#issuecomment-1064760776


   I did a test to reproduce this case:
   ```java
   public class Main {
       public static void main(String[] args) throws Exception {
           var pulsarClient = 
PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();
           var topicName = "test-topic-" + System.currentTimeMillis();
   
           var producer1 = pulsarClient
                   .newProducer(AvroSchema.of(MyPojo.class))
                   .topic(topicName).create();
           producer1.send(new MyPojo());
   
           var consumer = pulsarClient
                   .newConsumer(Schema.AVRO(MyPojo.class))
                   .topic(topicName).subscriptionName("test")
                   .subscriptionType(SubscriptionType.Shared)
                   
.subscriptionInitialPosition(SubscriptionInitialPosition.Latest)
                   .subscribe();
   
           var producer2 = pulsarClient
                   .newProducer(Schema.STRING)
                   .topic(topicName).create();
           producer2.send("test2");
   
           var msg = consumer.receive();
           msg.getValue();   // 
org.apache.pulsar.shade.org.apache.avro.SchemaParseException: Cannot parse 
<null> schema
       }
   }
   ```
   
   We cannot use the old schema to decode the message with the latest schema. 
   
   If you have such a scenario, we need to avoid this.


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


Reply via email to