ultrabug commented on pull request #1368:
URL: https://github.com/apache/avro/pull/1368#issuecomment-943224323
```rust
pub fn get_decoded_message(schema: &Schema, message: &BorrowedMessage<'_>)
-> Result<Partner> {
let mut reader = Cursor::new(&message.payload().unwrap()[5..]); // 5..
because I read from Confluent Kafka
let val = from_avro_datum(&schema, &mut reader, None).unwrap();
let partner: Partner = match &val {
Value::Record(inner) => from_value::<Partner>(&val).unwrap(),
_ => unreachable!(),
};
Ok(partner)
}
```
I'll have to trim the Partner struct from confidential entities and share a
trimmed schema as well. Will report back in a few.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]