Sha256: 0f0a7deecf3590fe8513021a9de6ab1f1a471e6fe47596ab67c89b6296100c5d

Contents?: true

Size: 647 Bytes

Versions: 26

Compression:

Stored size: 647 Bytes

Contents

module Kafka
  module Protocol
    class OffsetFetchRequest
      def initialize(group_id:, topics:)
        @group_id = group_id
        @topics = topics
      end

      def api_key
        OFFSET_FETCH_API
      end

      def api_version
        1
      end

      def response_class
        OffsetFetchResponse
      end

      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
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ruby-kafka-0.5.0.beta3 lib/kafka/protocol/offset_fetch_request.rb
ruby-kafka-0.5.0.beta2 lib/kafka/protocol/offset_fetch_request.rb
ruby-kafka-0.4.3 lib/kafka/protocol/offset_fetch_request.rb
ruby-kafka-0.4.2 lib/kafka/protocol/offset_fetch_request.rb
ruby-kafka-0.4.1 lib/kafka/protocol/offset_fetch_request.rb
ruby-kafka-0.4.0 lib/kafka/protocol/offset_fetch_request.rb