Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Commit

Permalink
Add comments to the simulation file.
Browse files Browse the repository at this point in the history
  • Loading branch information
mnogu committed Dec 23, 2015
1 parent c4b2c36 commit 50e45d0
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,26 @@ import com.github.mnogu.gatling.kafka.Predef._

class BasicSimulation extends Simulation {
val kafkaConf = kafka
// Kafka topic name
.topic("test")
// Kafka producer configs
.properties(
Map(
ProducerConfig.ACKS_CONFIG -> "1",
// list of Kafka broker hostname and port pairs
ProducerConfig.BOOTSTRAP_SERVERS_CONFIG -> "localhost:9092",

// in most cases, StringSerializer or ByteArraySerializer
ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG ->
"org.apache.kafka.common.serialization.StringSerializer",
ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG ->
"org.apache.kafka.common.serialization.StringSerializer"))

val scn = scenario("Kafka Test")
.exec(kafka("request").send[String]("foo"))
.exec(
kafka("request")
// message to send
.send[String]("foo"))

setUp(
scn
Expand Down

0 comments on commit 50e45d0

Please sign in to comment.