Class: Kafka::Protocol::InitProducerIDResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/kafka/protocol/init_producer_id_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_codeObject (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_epochObject (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_idObject (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