Trying to run custom kafkaProtocol but ZincCompiler fails

Hello I use gatling (3.1.2 ), scala( 2.12.1) , gatling-maven-plugin(3.0.1).
Pom.xml attached .

I defined custom KafkaProtocol and wrote simple test (look attached picture please)

but it looks like my code is not reachable by ZincCompiler.
(additional code will be provided if needed)
How can I find the reason of issue? Thanks in advance.

17:28:09.460 [main][ERROR][ZincCompiler.scala:151] i.g.c.ZincCompiler$ - /Users/xxxxxxx/fd-gatling/dataflow/src/test/scala/simulations/PrepareKafkaSimulation.scala:3:8: not found: object dataflow
import dataflow.kafka.Predef._
^
17:28:09.586 [main][ERROR][ZincCompiler.scala:151] i.g.c.ZincCompiler$ - /Users/xxxxxxx/fd-gatling/dataflow/src/test/scala/simulations/PrepareKafkaSimulation.scala:5:8: not found: object dataflow
import dataflow.kafka.protocol.KafkaProtocol
^
17:28:09.587 [main][ERROR][ZincCompiler.scala:151] i.g.c.ZincCompiler$ - /Users/xxxxxxx/fd-gatling/dataflow/src/test/scala/simulations/PrepareKafkaSimulation.scala:20:25: not found: type KafkaProtocol
val kafkaMetadataConf: KafkaProtocol = kafka
^
17:28:09.589 [main][ERROR][ZincCompiler.scala:151] i.g.c.ZincCompiler$ - /Users/xxxxxxx/fd-gatling/dataflow/src/test/scala/simulations/PrepareKafkaSimulation.scala:31:25: not found: type KafkaProtocol
val kafkaStreamsConf: KafkaProtocol = kafka
^
17:28:09.630 [main][ERROR][ZincCompiler.scala:151] i.g.c.ZincCompiler$ - /Users/xxxxxxx/fd-gatling/dataflow/src/test/scala/simulations/PrepareKafkaSimulation.scala:21:6: object topic is not a member of package kafka
possible cause: maybe a semicolon is missing before object topic'? .topic("metadata") ^ 17:28:09.712 [main][ERROR][ZincCompiler.scala:151] i.g.c.ZincCompiler$ - /Users/xxxxxxx/fd-gatling/dataflow/src/test/scala/simulations/PrepareKafkaSimulation.scala:32:6: object topic is not a member of package kafka possible cause: maybe a semicolon is missing before object topic’?
.topic(“streams”)
^
17:28:09.917 [main][ERROR][ZincCompiler.scala:151] i.g.c.ZincCompiler$ - /Users/xxxxxxx/fd-gatling/dataflow/src/test/scala/simulations/PrepareKafkaSimulation.scala:55:11: package kafka is not a value
.exec(kafka(sendMessageToStreamsTopic).send[String](session => session(“payload”).as[String]))
^
17:28:09.979 [main][ERROR][ZincCompiler.scala:151] i.g.c.ZincCompiler$ - /Users/xxxxxxx/fd-gatling/dataflow/src/test/scala/simulations/PrepareKafkaSimulation.scala:70:11: package kafka is not a value
.exec(kafka(sendMessageToMetadataTopic).send[String](session => session(“payload”).as[String]))

ZincCompiler error is:

Compilation crashed
sbt.internal.inc.CompileFailed: null
at sbt.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:242)
at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:111)
at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:90)
at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3(MixedAnalyzingCompiler.scala:82)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:133)
at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:73)
at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:116)
at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:307)
at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:307)
at sbt.internal.inc.Incremental$.doCompile(Incremental.scala:106)
at sbt.internal.inc.Incremental$.$anonfun$compile$4(Incremental.scala:87)
at sbt.internal.inc.IncrementalCommon.recompileClasses(IncrementalCommon.scala:116)
at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:63)
at sbt.internal.inc.Incremental$.$anonfun$compile$3(Incremental.scala:89)
at sbt.internal.inc.Incremental$.manageClassfiles(Incremental.scala:134)
at sbt.internal.inc.Incremental$.compile(Incremental.scala:80)
at sbt.internal.inc.IncrementalCompile$.apply(Compile.scala:67)
at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:311)
at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:269)
at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:159)
at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:238)
at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:69)
at io.gatling.compiler.ZincCompiler$.doCompile(ZincCompiler.scala:210)
at io.gatling.compiler.ZincCompiler$.delayedEndpoint$io$gatling$compiler$ZincCompiler$1(ZincCompiler.scala:215)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:39)
at scala.Function0.apply$mcV$sp(Function0.scala:39)
at scala.Function0.apply$mcV$sp$(Function0.scala:39)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
at scala.App.$anonfun$main$1$adapted(App.scala:80)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.App.main(App.scala:80)
at scala.App.main$(App.scala:78)
at io.gatling.compiler.ZincCompiler$.main(ZincCompiler.scala:39)
at io.gatling.compiler.ZincCompiler.main(ZincCompiler.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)

pom.xml (2.73 KB)

Gatling doesn’t have an official Kafka plugin, but there’s a community one: https://gatling.io/docs/current/extensions/.
You would need to import it in your project.

If you have more questions regarding this plugin, please try to reach out its author directly.

Regards,