-
Notifications
You must be signed in to change notification settings - Fork 3
Not able to add value from feeder in Kafka Header #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello there ! any updates on this ? i am facing the same issue and didn't find any solution for that so far. |
Also would like to be able to use this please! any update on the merge request? |
Hello guys, I'll try to review this PR by the weekend |
@vijayjoshi16 It support session variables, but little different way. See this example: import org.galaxio.gatling.kafka.Predef._
import io.gatling.core.Predef._
...
val kafkaRequestKey = kafkaRequest.key.getOrElse("")
val kafkaRequestBody = kafkaRequest.body
val feederUuid: Feeder[String] = Iterator.continually(Map("UUID" -> java.util.UUID.randomUUID().toString))
val header: Expression[Headers] = session => session("UUID").validate[String] // here UUID is name of session variable
.map(uuid => new RecordHeaders().add("uuid-header", uuid.getBytes))
val scn = scenario("KafkaTest").feed(feederUuid)
.exec(kafka("KafkaMessage").send[String, String](kafkaRequestKey, kafkaRequestBody, header)) |
Should work with #18 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm trying to add value from a feeder to header in a Kafka request but not able to do so.
I initially set up feeders in a way similar to this:
And I build my Kafka scenario as:
The feeders work fine for kafka key and kafka body but do not work for headers as I get #{UUID} printed as it is rather than the value
I found a similar issue on another plugin, but the steps over there are also not helping me: Tinkoff/gatling-kafka-plugin#110
Can anyone help me out since I see that this plugin doesn't seem to support feeders for headers?
The text was updated successfully, but these errors were encountered: