diff options
author | Taras Voinarovskyi <voyn1991@gmail.com> | 2017-10-14 23:06:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-14 23:06:27 +0300 |
commit | fbbd6ca5d999a8520d483ecfe0ad6f805eb8833f (patch) | |
tree | 52e5860b1f8738b15e7c757c205961b761badd2b /kafka/errors.py | |
parent | dd8e33654f2270097d6c1373dc272153670e48f8 (diff) | |
parent | 365cae02da59721df77923bb5f5a2d94a84b2e83 (diff) | |
download | kafka-python-fbbd6ca5d999a8520d483ecfe0ad6f805eb8833f.tar.gz |
Merge pull request #1252 from dpkp/legacy_records_refactor
Refactor MessageSet and Message into LegacyRecordBatch
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 |