Skip to content

Commit 0d4ba49

Browse files
committed
Allow for key-only AVRO payloads
https://github.com/confluentinc/confluent-kafka-python/blob/956ff94f090b19e60b057ec3eae6c6243deace05/confluent_kafka/src/confluent_kafka.c#L470 is only testing the value and returning 0 with no regards for the key. We need to check both the value and key here.
1 parent d9d291e commit 0d4ba49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

confluent_kafka/avro/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def poll(self, timeout=None):
143143
"""
144144
timeout = timeout or -1
145145
message = super(AvroConsumer, self).poll(timeout)
146-
if not message:
146+
if not message.value() and not message.key():
147147
return message
148148
if not message.error():
149149
if message.value() is not None:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy