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

Locale is not handled properly in kafka-consumer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.0.1
    • 0.10.0.0
    • consumer
    • None

    Description

      If the JVM local language is Turkish, which has different upper case for the lower case letter i, the result is a runtime error caused by org.apache.kafka.clients.consumer.OffsetResetStrategy. More specifically an enum constant EARLÄ°EST is generated which does not match EARLIEST (note the dotted capital i).

      If the locale for the JVM is explicitly set to en_US, the example runs as expected.

      A sample error log is below:

      {noforma}

      [akka://ReactiveKafka/user/$a] Failed to construct kafka consumer
      akka.actor.ActorInitializationException: exception during creation
      at akka.actor.ActorInitializationException$.apply(Actor.scala:172)
      at akka.actor.ActorCell.create(ActorCell.scala:606)
      at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:461)
      at akka.actor.ActorCell.systemInvoke(ActorCell.scala:483)
      at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:282)
      at akka.dispatch.Mailbox.run(Mailbox.scala:223)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.kafka.common.KafkaException: Failed to construct kafka consumer
      at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:648)
      at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:542)
      at com.softwaremill.react.kafka.ReactiveKafkaConsumer.consumer$lzycompute(ReactiveKafkaConsumer.scala:31)
      at com.softwaremill.react.kafka.ReactiveKafkaConsumer.consumer(ReactiveKafkaConsumer.scala:30)
      at com.softwaremill.react.kafka.KafkaActorPublisher.<init>(KafkaActorPublisher.scala:17)
      at com.softwaremill.react.kafka.ReactiveKafka$$anonfun$consumerActorProps$1.apply(ReactiveKafka.scala:270)
      at com.softwaremill.react.kafka.ReactiveKafka$$anonfun$consumerActorProps$1.apply(ReactiveKafka.scala:270)
      at akka.actor.TypedCreatorFunctionConsumer.produce(IndirectActorProducer.scala:87)
      at akka.actor.Props.newActor(Props.scala:214)
      at akka.actor.ActorCell.newActor(ActorCell.scala:562)
      at akka.actor.ActorCell.create(ActorCell.scala:588)
      ... 7 more
      Caused by: java.lang.IllegalArgumentException: No enum constant org.apache.kafka.clients.consumer.OffsetResetStrategy.EARLÄ°EST
      at java.lang.Enum.valueOf(Enum.java:238)
      at org.apache.kafka.clients.consumer.OffsetResetStrategy.valueOf(OffsetResetStrategy.java:15)
      at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:588)
      ... 17 more

      
      

      Attachments

        Issue Links

          Activity

            People

              rsivaram Rajini Sivaram
              tanjucat Tanju Cataltepe
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: