gatling-kafka
gatling-kafka copied to clipboard
Any possibility to have topic as a dynamic value from feeder?
You can accomplish this using a feeder.
def msg: String = {//some method}
val messageGenerator = Iterator.continually(Map("message" -> msg))
val loadScenario: ScenarioBuilder = scenario(" Scenario")
.feed(messageGenerator)
.exec(kafka("request")
.send[String]("${message}"))
Its a bit round-about, but it works.
Sent a PR that adds a more direct approach: https://github.com/mnogu/gatling-kafka/pull/17
This feature would be great to have in the mainstream.