gatling-kafka-plugin
gatling-kafka-plugin copied to clipboard
Using session attributes inside the avro object builder
Hi there, Could you please add the ability to use session attributes in the avro object builder. For example, I use this code
exec( _.set("text", "Hello"))
.exec(
kafka("incomeMsg")
.send("myTopic",
AvroObject
.newBuilder()
.setMessage("${text}")
.build())
)
I expect that the instance of AvroObject will contain field "Message"="Hello", but it's equal to "${text}", like String
Hi, I am facing similar issue when trying to use feeder for kafka messages. This is my example code:
val feeder = Array(
Map("foo" -> "foo1", "bar" -> "bar1"),
Map("foo" -> "foo2", "bar" -> "bar2"),
Map("foo" -> "foo3", "bar" -> "bar3")
).random
val scn = scenario("Kafka Test")
.feed(feeder)
.exec(kafka("request")
.send[String, String]("${foo}", "${bar}"))
In the topic I get "${foo}" for key and "${bar}" for value, instead of their values from feeder (foo1, bar1 ... etc). Probably related to the issue described above.
Hi, I am also facing the issue that I cannot inject random avro message to the send method. Do you have any information if a fix will be available soon?