Skip to content

Add support for fastavro when reader schema isn't provided. #773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion confluent_kafka/avro/serializer/message_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ def _get_decoder_func(self, schema_id, payload, is_key=False):
# try to use fast avro
try:
fast_avro_writer_schema = parse_schema(writer_schema_obj.to_json())
fast_avro_reader_schema = parse_schema(reader_schema_obj.to_json())
fast_avro_reader_schema = None if reader_schema_obj is None \
else parse_schema(reader_schema_obj.to_json())
schemaless_reader(payload, fast_avro_writer_schema)

# If we reach this point, this means we have fastavro and it can
Expand Down