gatling-kafka icon indicating copy to clipboard operation
gatling-kafka copied to clipboard

Any possibility to have topic as a dynamic value from feeder?

Open ianomad opened this issue 7 years ago • 3 comments

ianomad avatar Mar 31 '17 22:03 ianomad

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.

Bekreth avatar Apr 04 '18 20:04 Bekreth

Sent a PR that adds a more direct approach: https://github.com/mnogu/gatling-kafka/pull/17

reftel avatar Apr 24 '18 07:04 reftel

This feature would be great to have in the mainstream.

gustavomonarin avatar Nov 04 '21 11:11 gustavomonarin