confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
53 stars 857 forks source link

Deserializer error : Expecting data with Confluent Schema Registry framing. Magic byte was 48, expecting 0 #1938

Open insighter1 opened 1 year ago

insighter1 commented 1 year ago

Description

When using the AvroDeserializer class to deserialize a message with a defined schema in the schemaregistry, I get the following error:

Value deserialization error Expecting data with Confluent Schema Registry framing. Magic byte was 48, expecting 0

The schema registry being used is Apicurio Registry by the upstream Java application. I used avrogen to generate the classes used for deserialization.

Any suggestion or sample code to solve the issue?

mhowlett commented 1 year ago

AvroDeserializer expects avro serialized data with specific framing (magic byte of 0, then schema id). it looks like however you produced the message data did not also produce the framing expected by AvroDeserializer.

insighter1 commented 1 year ago

The producer application is a java based application and the settings at their end are : spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer spring.kafka.consumer.value-deserializer=io.apicurio.registry.serde.avro.AvroKafkaDeserializer spring.kafka.consumer.properties.apicurio.registry.use-specific-avro-reader=true spring.kafka.consumer.properties.apicurio.registry.url=${kafka.schema.registry.url:}

The error being received is in .NET consumer application

anchitj commented 6 months ago

@insighter1 if this is still an issue can you add more details?