BewareMyPower commented on issue #7728:
URL: https://github.com/apache/pulsar/issues/7728#issuecomment-689286006


   @codelipenghui @sijie I reproduced the issue accidentally. If the broker's 
`allowAutoTopicCreationType` is `partitioned`, then the automatically created 
topic has no schema.
   
   It's easy to reproduce:
   1. Run a consumer to subscribe a topic that doesn't exist now, e.g.:
   
       ```java
               try (Consumer<byte[]> consumer = client.newConsumer() //
                       .topic("PulsarBar") // PulsarBar doesn't exist
                       .subscriptionName("my-sub") //
                       .subscribe()) {
       ```
   
   2. Check the topic's schema
   
       ```bash
       $ ./bin/pulsar-admin schemas get "persistent://public/default/PulsarBar"
       HTTP 404 Not Found
   
       Reason: HTTP 404 Not Found
       $ ./bin/pulsar-admin schemas get 
"persistent://public/default/PulsarBar-partition-0"
       HTTP 404 Not Found
   
       Reason: HTTP 404 Not Found
       ```
   
   The broker logs:
   
   ```
   11:36:15.409 [ForkJoinPool.commonPool-worker-25] INFO  
org.eclipse.jetty.server.RequestLog - 10.208.65.74 - - [09/Sep/2020:11:36:15 
+0800] "GET 
/admin/v2/schemas/public/default/PulsarBar/schema?authoritative=true HTTP/1.1" 
404 0 "-" "Pulsar-Java-v2.6.0" 4
   ```


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