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
- is related to
-
KAFKA-17770 system default Locale sensitivity in scala code uppercasing enums
- Open
-
KAFKA-17799 Forbid use of the default system locale
- Open