You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.
NOTE: I have seen similar issue here zendesk/maxwell#360
But I am not sure if it is relevant. Also it is not clear for me how to configure advertised.listeners in gatling, it is not to a producer option...
Please advise.
package load
import java.util.Date
import com.github.mnogu.gatling.kafka.Predef._
import io.gatling.core.Predef._
import org.apache.kafka.clients.producer.ProducerConfig
class KafkaSimulation extends Simulation {
val kafkaConf = kafka
.topic("test_events") // Kafka topic name
.properties( // Kafka producer configs
Map(
ProducerConfig.ACKS_CONFIG -> "1",
ProducerConfig.BOOTSTRAP_SERVERS_CONFIG -> "node-perf-01.ops.com:9092", // list of Kafka broker hostname and port pairs
ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG ->
"org.apache.kafka.common.serialization.StringSerializer", // in most cases, StringSerializer or ByteArraySerializer
ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG ->
"org.apache.kafka.common.serialization.StringSerializer"
)
)
val scn = scenario("Kafka Test")
.exec(
kafka("request")
// message to send
.send[String]("foo" + (new Date()).toString))
val loadProfile = scn.inject(
rampUsers(10) over (5)
)
setUp(loadProfile)
.protocols(kafkaConf)
.maxDuration(20)
}
advertised.listeners is kafka broker config. No matter what you have configured in ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, this is only valid for bootstrap process. Kafka broker will send you list of all brokers that are part of the cluster then and they will be sent as configured in advertised.listeners.
It seems you have advertised.listeners set to localhost.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
hi
I am trying to use provided examples, they worked perfectly on localhost, but do not work with remote kafka.
despite I am setting
gatling attemps to connect localhost and then fails with exception
QUESTION: Am I missing some config elsewhere?
NOTE: I have seen similar issue here zendesk/maxwell#360
But I am not sure if it is relevant. Also it is not clear for me how to configure
advertised.listeners
in gatling, it is not to a producer option...Please advise.
The text was updated successfully, but these errors were encountered: