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

Trailing space in Kafka ConsumerConfig

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.2.1
    • Fix Version/s: 0.10.0.0
    • Component/s: consumer
    • Labels:
      None
    • Environment:
      Local
    • Flags:
      Important

      Description

      When I by luck I had left value in properties file with trailing space it thrown such error.
      example :
      group.id=MyGroupID<Blank Space>

      when I read this group.id from properties file and put it to ConsumerConfig, the error appeared as below stacktrace.

      Exception in thread "Thread-1003" kafka.common.InvalidConfigException: client.id MyUserDataReaderGroup is illegal, contains a character other than ASCII alphanumerics, '.', '_' and '-'
      at kafka.common.Config$class.validateChars(Config.scala:32)
      at kafka.consumer.ConsumerConfig$.validateChars(ConsumerConfig.scala:25)
      at kafka.consumer.ConsumerConfig$.validateClientId(ConsumerConfig.scala:64)
      at kafka.consumer.ConsumerConfig$.validate(ConsumerConfig.scala:57)
      at kafka.consumer.ConsumerConfig.<init>(ConsumerConfig.scala:184)
      at kafka.consumer.ConsumerConfig.<init>(ConsumerConfig.scala:94)
      at my.package.group.services.kafka.MyUserDataConsumer.setKafkaConfig(MyUserDataConsumer.java:96)
      at my.package.group.services.kafka.MyUserDataConsumer.run(MyUserDataConsumer.java:112)
      2016-03-10 13:34:41.280:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@69a90966

      {/km,file:/tmp/jetty-0.0.0.0-8080-km.war-_km-any-7539601194543292160.dir/webapp/,AVAILABLE} {/km.war}

      2016-03-10 13:34:47.128:INFO:ProProject:main: Spring WebApplicationInitializers detected on classpath: [my.package.group.ProProject.services.web.ApplicationInitializer@3474c3b6]
      2016-03-10 13:34:47.259:INFO:ProProject:main: Initializing Spring root WebApplicationContext
      2016-03-10 13:34:55.972:INFO:ProProject:main: Initializing Spring FrameworkServlet 'dispatcher'
      2016-03-10 13:34:56.782:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@554b8728

      {/ProProject,file:/tmp/jetty-0.0.0.0-8080-ProProject.war-_ProProject-any-2165600182871766069.dir/webapp/,AVAILABLE} {/ProProject.war}

      2016-03-10 13:34:56.792:INFO:oejs.ServerConnector:main: Started ServerConnector@65269268

      {HTTP/1.1} {0.0.0.0:8080}

        Attachments

          Activity

            People

            • Assignee:
              omkreddy Manikumar
              Reporter:
              kundantre Kundan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: