summaryrefslogtreecommitdiff
path: root/kafka/protocol.py
diff options
context:
space:
mode:
authorOmar Ghishan <omar.ghishan@rd.io>2014-01-02 18:14:44 -0800
committerOmar Ghishan <omar.ghishan@rd.io>2014-01-06 15:14:50 -0800
commit009ed92894b03a95a473359e64c5499665697b10 (patch)
tree4f5029bdf1c1ea3dc1c3c27a065050114b8e5bc4 /kafka/protocol.py
parent93b6579a0f5192b733e403acc38fc5ae952d4a08 (diff)
downloadkafka-python-009ed92894b03a95a473359e64c5499665697b10.tar.gz
Add note about questionable error handling while decoding messages.
Will remove once any error handling issues are resolved.
Diffstat (limited to 'kafka/protocol.py')
-rw-r--r--kafka/protocol.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/kafka/protocol.py b/kafka/protocol.py
index 74a0dce..54b8eee 100644
--- a/kafka/protocol.py
+++ b/kafka/protocol.py
@@ -119,6 +119,14 @@ class KafkaProtocol(object):
read_message = True
yield OffsetAndMessage(offset, message)
except BufferUnderflowError:
+ # NOTE: Not sure this is correct error handling:
+ # Is it possible to get a BUE if the message set is somewhere
+ # in the middle of the fetch response? If so, we probably have
+ # an issue that's not fetch size too small.
+ # Aren't we ignoring errors if we fail to unpack data by
+ # raising StopIteration()?
+ # If _decode_message() raises a ChecksumError, couldn't that
+ # also be due to the fetch size being too small?
if read_message is False:
# If we get a partial read of a message, but haven't
# yielded anything there's a problem