none
Unable to create schema in schema registry using azure Eventhub RRS feed

  • Question

  • I am using Microsoft.Azure.Data.SchemaRegistry.ApacheAvro 1.0.0-beta1 and I'm trying to send event to the eventhub, using avro schema, but some some reason azure response is BadRequest: Code":400,"Detail":"Schema validation failed: Error parsing undefined value Path 'u0022typeu0022', line 1, position 17. I am using Microsoft provided examples, but I have no luck with them too.

    GenericRecord record = GetRecord(message);
    EventData data = new EventData(new BinaryData(record, avroSerializer, typeof(GenericRecord)));


    record = {Schema: {"type":"record","name":"TestSchema","namespace":"JA.Dto.Kafka.TestSchema","fields":[{"name":"Name","type":"string"}]}, contents: { Name: Hello world, }}

    The avroSerializer is SchemaRegistryAvroObjectSerializer, registered with schema registry client, schema group name and auto register schemas is allowed.

    In azure portal I tried with and without registering the schema.

    Stack trace is: at Azure.Data.SchemaRegistry.SchemaRestClient.Register(String groupName, String schemaName, SerializationType xSchemaType, String schemaContent, CancellationToken cancellationToken) at Azure.Data.SchemaRegistry.SchemaRegistryClient.RegisterSchema(String groupName, String schemaName, SerializationType serializationType, String schemaContent, CancellationToken cancellationToken) at Microsoft.Azure.Data.SchemaRegistry.ApacheAvro.SchemaRegistryAvroObjectSerializer.GetSchemaId(Schema schema, CancellationToken cancellationToken) at Microsoft.Azure.Data.SchemaRegistry.ApacheAvro.SchemaRegistryAvroObjectSerializer.Serialize(Stream stream, Object value, Type inputType, CancellationToken cancellationToken) at Azure.BinaryData..ctor(Object serializable, ObjectSerializer serializer, Type type) at ****\EventHub.AvroProducer`1.d__4.MoveNext() in ***\AvroProducer.cs:line 47

    Regards.

    Wednesday, October 28, 2020 4:49 PM

Answers

All replies

  • Hi Iliya Bakardzhiev,

    Thank you for posting here.

    In order to help you find the correct forum to go ask questions, I have moved the thread to 'where is the forum for' forum.

    Thank you for your understanding.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, October 29, 2020 1:25 AM
  • I'd try asking for help over here.

    https://docs.microsoft.com/en-us/answers/topics/azure-event-hubs.html

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Thursday, October 29, 2020 2:19 AM
    Moderator
  • https://stackoverflow.com/questions/64571458/unable-to-create-schema-in-schema-registry-using-azure-eventhub
    Sunday, November 1, 2020 10:43 AM