Hi, I have a feeder counter like: val counterFeeder: Iterator[Map[String, Int]] = Iterator.continually(Map(“counter” → count.getAndIncrement())).
I have the following scenarioBuilder
val scenarioBuilder: ScenarioBuilder = scenario("Kafkaimport")
.feed(counterFeeder)
.exec(
kafka("import_#{counter}")
.send(session => {
val c: String = "import_#{counter}"
println(c)
"6:" + String.format("%06d", #{counter})
}, sessionA => {
val data: Record = data.template
data.setCounter(String.format("%06d", "#{counter}"))
data
})
).exitHereIfFailed
In the section kafka(“import_#{counter}”) I get the value of my feeder counter correctly. But in the session Block e.g. here val c: String = “import_#{counter}” or String.format(“%06d”, #{counter} there is not the feeder value. If I print it out e.g. herer println(c) ==> console outpur: “mport_#{counter}. I have also tried with s”${counter}" but it does not help. Does anyone has an idea, why it does not work and how i get the value from the feeder in mein session block ?