Kundan created KAFKA-3372:
-----------------------------

             Summary: Trailing space in Kafka ConsumerConfig
                 Key: KAFKA-3372
                 URL: https://issues.apache.org/jira/browse/KAFKA-3372
             Project: Kafka
          Issue Type: Bug
          Components: consumer, kafka streams
    Affects Versions: 0.8.2.1
         Environment: Local
            Reporter: Kundan
            Assignee: Neha Narkhede


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}





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to