liangyepianzhou commented on issue #1031:
URL: 
https://github.com/apache/pulsar-client-go/issues/1031#issuecomment-1610903788

   The main reason is that the Java client's Proto and Proto native schema use 
Avro's avro.java.string extension to specify the string type during Proto 
parsing. To make the Go Proto file compatible, you can add extension 
annotations to the Go Proto file while keeping the Java Proto file unchanged. 
This allows the message to be correctly parsed by the Go client.
   
   Proto file in Go:
   ```
   message TestMessage {
       string stringField = 1 [(avro_java_string) = "String"];
       int32 intField = 2;
   }
   ```
   
   Proto file in Java:
   ```
   message TestMessage {
       string stringField = 1;
       int32 intField = 2;
   }
   ```
   


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