Kafka AVRO deserialize bytes decimal

I need to read from Kafka with AVRO, but something is wrong with parsing.

Does Pega support deserializing AVRO logical types like decimal?

My example schema excerpt is this

{ “type”: “record”,
“name”: “example”,
“fields”: [
{ “name”: “myProperty”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 5, “scale”: 3 } },
]
}

Result seems like parsing error {?} – attached

There was a hotfix provided by Pega for this use case HFIX-C1852. This fix will be included in Pega’25

Pega will not fully process the data, but will provide you with value like this: [ENC:BASE64]AIw=

This [ENC:BASE64]AIw= corresponds to 0.140 in my case

So here are the steps you need to do:

  1. decode from base64 to byte array
  2. convert bytes into hex and construct a string
  3. parse the string with something like Integer.decode()
  4. construct BigDecimal or whatever you need