You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/04 14:06:35 UTC

[GitHub] [pulsar-client-go] oryx2 commented on a change in pull request #611: feat: support multiple schema version for producer and consumer

oryx2 commented on a change in pull request #611:
URL: https://github.com/apache/pulsar-client-go/pull/611#discussion_r702288485



##########
File path: pulsar/impl_message.go
##########
@@ -262,9 +264,20 @@ func (msg *message) GetReplicatedFrom() string {
 }
 
 func (msg *message) GetSchemaValue(v interface{}) error {
+	if msg.schemaVersion != nil {
+		schema, err := msg.schemaInfoCache.Get(msg.schemaVersion)
+		if err != nil {
+			return err
+		}
+		return (*schema).Decode(msg.payLoad, v)

Review comment:
       Thanks review. Because schemaCache store the pointer of schema interface, I have change to schema instance .




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org