marcosschroh / marcosschroh/python-schema-registry-client

Create Event class to use with the serializer.

Open
#132 1 comment 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
178
Forks
57
PR merge metrics
No merged PRs in 30d

Description

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 https://github.com/marcosschroh/python-schema-registry-client/issues/129

```python
class Event:
def __init__(self, data, payload, schema_id):
...

def headers(self):
...
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing encode_record_with_schema_id, encode_record_with_schema, and decode_message, then review related issue 129 for context. Done means these methods return an Event containing the original data or record, encoded payload, schema_id, and possible Kafka headers, with headers exposed as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
kafka, python
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.