Class: Kafka::Protocol::HeartbeatRequest

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

Instance Method Summary collapse

Constructor Details

#initialize(group_id:, generation_id:, member_id:) ⇒ HeartbeatRequest


4
5
6
7
8
# File 'lib/kafka/protocol/heartbeat_request.rb', line 4

def initialize(group_id:, generation_id:, member_id:)
  @group_id = group_id
  @generation_id = generation_id
  @member_id = member_id
end

Instance Method Details

#api_keyObject


10
11
12
# File 'lib/kafka/protocol/heartbeat_request.rb', line 10

def api_key
  12
end

#encode(encoder) ⇒ Object


18
19
20
21
22
# File 'lib/kafka/protocol/heartbeat_request.rb', line 18

def encode(encoder)
  encoder.write_string(@group_id)
  encoder.write_int32(@generation_id)
  encoder.write_string(@member_id)
end

#response_classObject


14
15
16
# File 'lib/kafka/protocol/heartbeat_request.rb', line 14

def response_class
  HeartbeatResponse
end