Types mapping
Types described in Avro specification have to be mapped to types present in MediationZone platform.
...
*NOTE: Numeric types needs casting while preparing data for encoding. Check Avro Decoder/Encoder example to see the usage.
UDRs
The following UDRs should be used while working with Avro Decoder/Encoder
DynamicAvroUDR
DynamicAvroUDR is an output of Avro Decoder. The type of “data” filed depends on the schema used for encoding/decoding the payload.
...
Field | Description |
---|---|
data (any) | Contains content decoded using decoder |
AvroDecoderUDR
AvroDecoderUDR is used as an input for Avro Decoder.
...
Field | Description |
---|---|
data (bytearray) | This field contains binary encoded avro message payload. This should be just a message payload without any metadata. |
readerSchemaID (string) | Avro Reader SchemaID - ID of compatible schema used for reading data |
writerSchemaID (string) | Avro Writer SchemaID - schema used for encoding the message |
AvroEncoderUDR
AvroEncoderUDR is used as an input for Avro Encoder.
...
Field | Description |
---|---|
data (any) | This field contains an UDR/type to be encoded using selected schema |
writerSchemaID (string) | Avro Writer SchemaID - schema used for encoding the message |
AvroEnumUDR
AvroEnumUDR is used represent Enum avro type.
...
Field | Description |
---|---|
fullname (string) | Name of the enum field |
symbol (string) | Selected value of the specific enum type |
AvroFixedUDR
AvroFixedUDR is used to representive Fixed avro type.
...
Field | Description |
---|---|
bytes (bytearray) | Byte value of the field |
fullname (string) | Name of the fixed field |
AvroRecordUDR
AvroRecordUDR is used to represent Avro Record structure.
...