Sha256: 56503c9f2b7688a08df590885e6681d254dee3a8259c8f11f736f7370d13dab7

Contents?: true

Size: 475 Bytes

Versions: 11

Compression:

Stored size: 475 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 response_class
        Protocol::MetadataResponse
      end

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby-kafka-0.4.4 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.5.0 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.5.0.beta6 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.5.0.beta5 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.5.0.beta4 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.5.0.beta3 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.5.0.beta2 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.4.3 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.4.2 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.4.1 lib/kafka/protocol/topic_metadata_request.rb
ruby-kafka-0.4.0 lib/kafka/protocol/topic_metadata_request.rb