lib/kafka/cluster.rb
def add_target_topics(topics)
      new_topics = Set.new(topics) - @target_topics

      unless new_topics.empty?
        @logger.info "New topics added to target list: #{new_topics.to_a.join(', ')}"

        @target_topics.merge(new_topics)

        refresh_metadata!
      end
    end
# Adds a list of topics to the target list. Only the topics on this list will
# be queried for metadata.
#
# @param topics [Array<String>]
# @return [nil]
Adds a list of topics to the target list. Only the topics on this list will
be queried for metadata.
Adds a list of topics to the target list . Only the topics on this list will be queried for metadata .
def add_target_topics(topics)
      new_topics = Set.new(topics) - @target_topics
      unless new_topics.empty?
        @logger.info "New topics added to target list: #{new_topics.to_a.join(', ')}"
        @target_topics.merge(new_topics)
        refresh_metadata!
      end
    end
def add_target_topics ( topics ) new_topics = Set . new ( topics ) - @target_topics unless new_topics . empty? @logger . info "New topics added to target list: #{new_topics.to_a.join(', ')}" @target_topics . merge ( new_topics ) refresh_metadata! end end
Adds a list of topics to the target list.
Adds a list of topics to the target list .
None
nil
topics
None