Skip to content
Merged
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
5 changes: 5 additions & 0 deletions lib/kafka/protocol/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def self.decode(decoder)
timestamp = nil
when 1
timestamp = message_decoder.int64

# If the timestamp is set to zero, it's because the message has been upgraded
# from the Kafka 0.9 disk format to the Kafka 0.10 format. The former didn't
# have a timestamp attribute, so we'll just set the timestamp to nil.
timestamp = nil if timestamp.zero?
else
raise Kafka::Error, "Invalid magic byte: #{magic_byte}"
end
Expand Down