Module: KafkaSyrup::KafkaResponseErrors
- Defined in:
- lib/kafka_syrup/protocol/errors.rb
Constant Summary collapse
- ERRORS =
{ -1 => 'Unknown', 1 => 'OffsetOutOfRange', 2 => 'InvalidMessage', 3 => 'UnknownTopicOrPartition', 4 => 'InvalidMessageSize', 5 => 'LeaderNotAvailable', 6 => 'NotLeaderForPartition', 7 => 'RequestTimedOut', 8 => 'BrokerNotAvailable', 9 => 'ReplicaNotAvailable', 10 => 'MessageSizeTooLarge', 11 => 'StaleControllerEpochCode', 12 => 'OffsetMetadataTooLargeCode', 14 => 'OffsetsLoadInProgressCode', 15 => 'ConsumerCoordinatorNotAvailableCode', 16 => 'NotCoordinatorForConsumerCode' }
Class Method Summary collapse
Class Method Details
.raise_from_code(code, msg = nil) ⇒ Object
27 28 29 |
# File 'lib/kafka_syrup/protocol/errors.rb', line 27 def raise_from_code(code, msg = nil) raise const_get(ERRORS[code]).new(msg) if ERRORS.keys.include?(code) end |