Sha256: 50f97c4946cd8e19bffdc4a4e1a181bca5ce42e64d16b266289a5c4a34abd7c8

Contents?: true

Size: 518 Bytes

Versions: 3

Compression:

Stored size: 518 Bytes

Contents

module Kafka
  module Protocol
    class TopicMetadataRequest

      # A request for cluster metadata.
      #
      # @param topics [Array<String>]
      def initialize(topics: [])
        @topics = topics
      end

      def api_key
        TOPIC_METADATA_API
      end

      def api_version
        1
      end

      def response_class
        Protocol::MetadataResponse
      end

      def encode(encoder)
        encoder.write_array(@topics) {|topic| encoder.write_string(topic) }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-kafka-0.5.1 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.5.1.beta2 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.5.1.beta1 lib/kafka/protocol/topic_metadata_request.rb