Class: Kafka::Protocol::OffsetFetchRequest
- Inherits:
-
Object
- Object
- Kafka::Protocol::OffsetFetchRequest
- Defined in:
- lib/kafka/protocol/offset_fetch_request.rb
Instance Method Summary collapse
- #api_key ⇒ Object
- #api_version ⇒ Object
- #encode(encoder) ⇒ Object
-
#initialize(group_id:, topics:) ⇒ OffsetFetchRequest
constructor
A new instance of OffsetFetchRequest.
- #response_class ⇒ Object
Constructor Details
#initialize(group_id:, topics:) ⇒ OffsetFetchRequest
Returns a new instance of OffsetFetchRequest.
6 7 8 9 |
# File 'lib/kafka/protocol/offset_fetch_request.rb', line 6 def initialize(group_id:, topics:) @group_id = group_id @topics = topics end |
Instance Method Details
#api_key ⇒ Object
11 12 13 |
# File 'lib/kafka/protocol/offset_fetch_request.rb', line 11 def api_key OFFSET_FETCH_API end |
#api_version ⇒ Object
15 16 17 |
# File 'lib/kafka/protocol/offset_fetch_request.rb', line 15 def api_version 1 end |
#encode(encoder) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/kafka/protocol/offset_fetch_request.rb', line 23 def encode(encoder) encoder.write_string(@group_id) encoder.write_array(@topics) do |topic, partitions| encoder.write_string(topic) encoder.write_array(partitions) do |partition| encoder.write_int32(partition) end end end |
#response_class ⇒ Object
19 20 21 |
# File 'lib/kafka/protocol/offset_fetch_request.rb', line 19 def response_class OffsetFetchResponse end |