Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2734

kafka-console-consumer throws NoSuchElementException on not specifying topic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.0.0
    • 0.9.0.0
    • tools
    • None

    Description

      The logic of argument checking is flawed for kafka-console-consumer. Throws below mentioned exception when topic is not specified. Users wont have a clue what went wrong.

      Exception in thread "main" java.util.NoSuchElementException: head of empty list
      	at scala.collection.immutable.Nil$.head(List.scala:337)
      	at scala.collection.immutable.Nil$.head(List.scala:334)
      	at kafka.tools.ConsoleConsumer$ConsumerConfig.<init>(ConsoleConsumer.scala:244)
      	at kafka.tools.ConsoleConsumer$.main(ConsoleConsumer.scala:40)
      	at kafka.tools.ConsoleConsumer.main(ConsoleConsumer.scala)
      

      Attachments

        Activity

          People

            singhashish Ashish Singh
            singhashish Ashish Singh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: