Class: Kafka::Protocol::InitProducerIDResponse
- Inherits:
-
Object
- Object
- Kafka::Protocol::InitProducerIDResponse
- Defined in:
- lib/kafka/protocol/init_producer_id_response.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#producer_epoch ⇒ Object
readonly
Returns the value of attribute producer_epoch.
-
#producer_id ⇒ Object
readonly
Returns the value of attribute producer_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(error_code:, producer_id:, producer_epoch:) ⇒ InitProducerIDResponse
constructor
A new instance of InitProducerIDResponse.
Constructor Details
#initialize(error_code:, producer_id:, producer_epoch:) ⇒ InitProducerIDResponse
Returns a new instance of InitProducerIDResponse.
8 9 10 11 12 |
# File 'lib/kafka/protocol/init_producer_id_response.rb', line 8 def initialize(error_code:, producer_id:, producer_epoch:) @error_code = error_code @producer_id = producer_id @producer_epoch = producer_epoch end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
6 7 8 |
# File 'lib/kafka/protocol/init_producer_id_response.rb', line 6 def error_code @error_code end |
#producer_epoch ⇒ Object (readonly)
Returns the value of attribute producer_epoch.
6 7 8 |
# File 'lib/kafka/protocol/init_producer_id_response.rb', line 6 def producer_epoch @producer_epoch end |
#producer_id ⇒ Object (readonly)
Returns the value of attribute producer_id.
6 7 8 |
# File 'lib/kafka/protocol/init_producer_id_response.rb', line 6 def producer_id @producer_id end |
Class Method Details
.decode(decoder) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/kafka/protocol/init_producer_id_response.rb', line 14 def self.decode(decoder) _throttle_time_ms = decoder.int32 error_code = decoder.int16 producer_id = decoder.int64 producer_epoch = decoder.int16 new( error_code: error_code, producer_id: producer_id, producer_epoch: producer_epoch ) end |