When encode_record_with_schema_id or encode_record_with_schema is called with data/record, these methods should return an Event object containing the data/record, the payload (the data encoded), the schema_id used to serialize the data and possible kafka_headers rather than the payload encoded.
We want to do this in order to provide more information to the user.
The same should happen with the decode_message. Related to #129
class Event:
def __init__(self, data, payload, schema_id):
...
def headers(self):
...
When
encode_record_with_schema_idorencode_record_with_schemais called withdata/record, these methods should return anEvent objectcontaining thedata/record, thepayload(the data encoded), theschema_idused to serialize the data and possiblekafka_headersrather than thepayload encoded.We want to do this in order to provide more information to the user.
The same should happen with the
decode_message. Related to #129