Hi, when I have fatal error, the process not exit, I have SupervisionStrategy but this excpetion not handled.
When I put errored Kafka Bootstrap, for example:
[error] (run-main-0) org.apache.kafka.common.KafkaException: Failed to construct kafka producer
[error] org.apache.kafka.common.KafkaException: Failed to construct kafka producer
[error] at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:429)
[error] at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:286)
[error] at akka.kafka.ProducerSettings$.createKafkaProducer(ProducerSettings.scala:149)
[error] at akka.kafka.ProducerSettings$$anonfun$apply$3.apply(ProducerSettings.scala:70)
[error] at akka.kafka.ProducerSettings$$anonfun$apply$3.apply(ProducerSettings.scala:70)
[error] at akka.kafka.ProducerSettings.createKafkaProducer(ProducerSettings.scala:316)
[error] at akka.kafka.scaladsl.Producer$$anonfun$3.apply(Producer.scala:197)
[error] at akka.kafka.scaladsl.Producer$$anonfun$3.apply(Producer.scala:197)
[error] at akka.kafka.internal.DefaultProducerStage.createLogic(DefaultProducerStage.scala:37)
[error] at akka.stream.stage.GraphStage.createLogicAndMaterializedValue(GraphStage.scala:106)
[error] at akka.stream.stage.GraphStageWithMaterializedValue.createLogicAndMaterializedValue(GraphStage.scala:50)
[error] at akka.stream.impl.GraphStageIsland.materializeAtomic(PhasedFusingActorMaterializer.scala:674)
[error] at akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:491)
[error] at akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:446)
[error] at akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:443)
[error] at akka.stream.scaladsl.RunnableGraph.run(Flow.scala:629)
[error] at akka.stream.scaladsl.Source.runWith(Source.scala:106)
[error] at com.lojasrenner.distribution.math.engine.Main$.main(Main.scala:52)
[error] at com.lojasrenner.distribution.math.engine.Main.main(Main.scala)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] Caused by: org.apache.kafka.common.config.ConfigException: No resolvable bootstrap urls given in bootstrap.servers
[error] at org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses(ClientUtils.java:86)
[error] at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:407)
[error] at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:286)
[error] at akka.kafka.ProducerSettings$.createKafkaProducer(ProducerSettings.scala:149)
[error] at akka.kafka.ProducerSettings$$anonfun$apply$3.apply(ProducerSettings.scala:70)
[error] at akka.kafka.ProducerSettings$$anonfun$apply$3.apply(ProducerSettings.scala:70)
[error] at akka.kafka.ProducerSettings.createKafkaProducer(ProducerSettings.scala:316)
[error] at akka.kafka.scaladsl.Producer$$anonfun$3.apply(Producer.scala:197)
[error] at akka.kafka.scaladsl.Producer$$anonfun$3.apply(Producer.scala:197)
[error] at akka.kafka.internal.DefaultProducerStage.createLogic(DefaultProducerStage.scala:37)
[error] at akka.stream.stage.GraphStage.createLogicAndMaterializedValue(GraphStage.scala:106)
[error] at akka.stream.stage.GraphStageWithMaterializedValue.createLogicAndMaterializedValue(GraphStage.scala:50)
[error] at akka.stream.impl.GraphStageIsland.materializeAtomic(PhasedFusingActorMaterializer.scala:674)
[error] at akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:491)
[error] at akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:446)
[error] at akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:443)
[error] at akka.stream.scaladsl.RunnableGraph.run(Flow.scala:629)
[error] at akka.stream.scaladsl.Source.runWith(Source.scala:106)
[error] at com.lojasrenner.distribution.math.engine.Main$.main(Main.scala:52)
[error] at com.lojasrenner.distribution.math.engine.Main.main(Main.scala)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
I have this error, but process don’t exit.
I need this for Kubernetes check when stream have error and restart pod.