Module: Kafka::ErrorCodes

Defined in:
lib/kafka/error_codes.rb

Constant Summary collapse

NO_ERROR =
0
OFFSET_OUT_OF_RANGE =
1
INVALID_MESSAGE_CODE =
2
WRONG_PARTITION_CODE =
3
INVALID_RETCH_SIZE_CODE =
4
STRINGS =
{
  0 => 'No error',
  1 => 'Offset out of range',
  2 => 'Invalid message code',
  3 => 'Wrong partition code',
  4 => 'Invalid retch size code',
}

Class Method Summary collapse

Class Method Details

.to_s(code) ⇒ Object



31
32
33
# File 'lib/kafka/error_codes.rb', line 31

def self.to_s(code)
  STRINGS[code] || 'Unknown error'
end