You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although this method is not documented(nor tested) well, I expect the first return should be of the message type produced by the MessageFactory for the deserializer.
However, the first returned object is the return of vm.Eval(), and it's an error object:
This behavior basically makes Deserialize() unusable since usually there is no way for the caller of Deserialize() to access the message produced by the MessageFactory.
How to reproduce
Init a Schema Registry client and prepare a gogen-avro generated struct
with the following code:
// srClient: the Schema Registry clientdeser, _:=avro.NewSpecificDeserializer(srClient, serde.ValueSerde, avro.NewDeserializerConfig())
deser.MessageFactory=func(subject, namestring) (interface{}, error) {
// MyMessageType: a specific type generated by gogen-avrovarmyMessageMyMessageTypereturn&myMessage, nil
}
decodedValue, err:=deser.Deserialize(*kafkaMsg.TopicPartition.Topic, kafkaMsg.Value)
// decodedValue would be a nil if everything goes well :/
Checklist
Please provide the following information:
confluent-kafka-go and librdkafka version (LibraryVersion()): v1.9.2 / v1.9.2
Apache Kafka broker version: irrelevant
Client configuration: ConfigMap{...}: irrelevant
Operating system: irrelevant
Provide client logs (with "debug": ".." as necessary): irrelevant
Provide broker log excerpts: irrelevant
Critical issue
The text was updated successfully, but these errors were encountered:
Description
The method
Deserialize()
of the specific Avro deserializer has the signature like this:confluent-kafka-go/schemaregistry/serde/avro/avro_specific.go
Line 106 in 1092e01
Although this method is not documented(nor tested) well, I expect the first return should be of the message type produced by the
MessageFactory
for the deserializer.However, the first returned object is the return of
vm.Eval()
, and it's anerror
object:confluent-kafka-go/schemaregistry/serde/avro/avro_specific.go
Line 142 in 1092e01
This behavior basically makes
Deserialize()
unusable since usually there is no way for the caller ofDeserialize()
to access the message produced by theMessageFactory
.How to reproduce
Checklist
Please provide the following information:
LibraryVersion()
): v1.9.2 / v1.9.2ConfigMap{...}
: irrelevant"debug": ".."
as necessary): irrelevantThe text was updated successfully, but these errors were encountered: