merlimat commented on a change in pull request #1232: Schema registry (1/4)
URL: https://github.com/apache/incubator-pulsar/pull/1232#discussion_r168236331
 
 

 ##########
 File path: pulsar-common/src/main/proto/PulsarApi.proto
 ##########
 @@ -272,6 +289,8 @@ message CommandProducer {
 
     /// Add optional metadata key=value to this producer
     repeated KeyValue metadata    = 6;
+
+       optional int64 schema_version = 7;
 
 Review comment:
   It should carry the whole schema here. The application/producer doesn't 
necessarely know what the version is. 
   
   Eg: if I'm using a type like : 
   
   ```java
   class MyClass {
      public int a;
      public int b;
   };
   ```
   
   When I try to publish, I just know the format I'm about to send, and we can 
extract the avro/json schema out of it. When I try to create producer, I can 
send that information, and the broker can compare with the schemas already 
availalable for this topic. If the schema is know, we just return the schema 
version in the `ProducerSuccess`  response. If it's a new (compatible) version 
of the schema, it will also be stored.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to