Sha256: 538ed42e645b585d4740eef3fddfdd3d3237198901abd302007c35eb93feb728

Contents?: true

Size: 472 Bytes

Versions: 10

Compression:

Stored size: 472 Bytes

Contents

#!/usr/bin/env ruby

require_relative '../config/environment'

class DeleteTopic < Thor
  default_command :delete

  desc 'NAME', 'delete an existing Apache Kafka topic'
  option :verbose, aliases: '-v', type: :boolean,
         desc: 'Enable verbose outputs'

  def delete(name)
    debug! options

    unless topic?(name)
      STDERR.puts "The topic '#{name}' does not exists."
      exit 1
    end

    KafkaClient.delete_topic name
  end
end
DeleteTopic.start(args!)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rimless-1.8.0 doc/kafka-playground/bin/delete-topic
rimless-1.7.7 doc/kafka-playground/bin/delete-topic
rimless-1.7.6 doc/kafka-playground/bin/delete-topic
rimless-1.7.5 doc/kafka-playground/bin/delete-topic
rimless-1.7.4 doc/kafka-playground/bin/delete-topic
rimless-1.7.3 doc/kafka-playground/bin/delete-topic
rimless-1.7.2 doc/kafka-playground/bin/delete-topic
rimless-1.7.1 doc/kafka-playground/bin/delete-topic
rimless-1.7.0 doc/kafka-playground/bin/delete-topic
rimless-1.6.0 doc/kafka-playground/bin/delete-topic