Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Value serialization error while parsing optional long type #21

Description

Hi, I am trying to parse a long value into optional long type, but it gives an exception stating can't find a match for System.Double. If I include double in the type, then it works fine. Please find below details -

AVRO schema -
{ "name": "xyz", "type": ["long", "null"], "default": null, "logicalType": "timestamp-millis" }

Exception -
Avro.AvroException: Cannot find a match for System.Double in {"type":["long","null"]} in field ********* at Avro.Generic.DefaultWriter.WriteRecord(RecordSchema schema, Object value, Encoder encoder) at Confluent.SchemaRegistry.Serdes.GenericSerializerImpl.Serialize(String topic, GenericRecord data, Boolean isKey) at Confluent.SchemaRegistry.Serdes.AvroSerializer1.SerializeAsync(T value, SerializationContext context)
at Confluent.Kafka.Producer2.ProduceAsync(TopicPartition topicPartition, Message2 message)
--- End of inner exception stack trace ---`

I will really appreciate any inputs or workaround with this regard.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions