diff options
Diffstat (limited to 'kafka/errors.py')
-rw-r--r-- | kafka/errors.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kafka/errors.py b/kafka/errors.py index c72455a..4a409db 100644 --- a/kafka/errors.py +++ b/kafka/errors.py @@ -101,12 +101,15 @@ class OffsetOutOfRangeError(BrokerResponseError): ' maintained by the server for the given topic/partition.') -class InvalidMessageError(BrokerResponseError): +class CorruptRecordException(BrokerResponseError): errno = 2 - message = 'INVALID_MESSAGE' + message = 'CORRUPT_MESSAGE' description = ('This message has failed its CRC checksum, exceeds the' ' valid size, or is otherwise corrupt.') +# Backward compatibility +InvalidMessageError = CorruptRecordException + class UnknownTopicOrPartitionError(BrokerResponseError): errno = 3 |