We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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:
scn = scn.feed( Iterator.continually(Map(UUID.toString -> getRandomValue(UUID, None))) ) def getRandomValue( valueType: RandomValueTypes.Value, length: Option[Int] ): String = { valueType match { case UUID => java.util.UUID.randomUUID().toString } }
And I build my Kafka scenario as:
case kafkaRequest : KafkaRequest => val kafkaRequestKey = kafkaRequest.key.getOrElse("") val kafkaRequestBody = kafkaRequest.body val kafkaRequestHeaders = mapToRecordHeaders(kafkaRequest.headers) scn = scn.group(getNameWithTestId(ReportSections.KAFKA_GROUP, testId)) { exec( kafka(kafkaRequest.name).send[String, String]( key = kafkaRequestKey, payload = kafkaRequestBody, headers = kafkaRequestHeaders ) ) } private def mapToRecordHeaders( headersOpt: Option[Map[String, String]] ): RecordHeaders = { val recordHeaders = new RecordHeaders() headersOpt.foreach { headers => headers.foreach { case (key, value) => recordHeaders.add(key, value.getBytes("UTF-8")) } } recordHeaders }
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:
@jigarkhwar @red-bashmak
Sorry, something went wrong.
Hello there ! any updates on this ? i am facing the same issue and didn't find any solution for that so far.
No branches or pull requests
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: