Gatling Kafka extensions : Consumers

Hi,

I am trying to extend the gatling kafka extension (by Muneyuki Noguchi) for consumers, using the gatling-jms module as a template.

it works after a fashion. (But I’m coming to grips with the combination of Scala, Akka and Gatling so it could be definitely

improved.There are some TODO’s …)

In any case I have one particular issue I was wondering about. After a successful run my

active users is -20 and percentage is 200%. Instead of 0 and 100% (see example put below)

I update the stats in this package (KafkaRequestTrackerActor.scala)

 statsEngine.logResponse(session, title, timings, status, None, message)
 next ! session.logGroupRequest(timings.*responseTime*, status).increaseDrift(*nowMillis* - received)

Is this something you’ve seen before or can shed some light on?

Thanks for any insights,

Kevin

Simulation util.BasicSimulation started…

So there are twice as many end events sent as I would expect and this explains why the active count is negative.
But why are they too many events I’m not sure

So for this scenario, 5 Users

scn
  .inject(constantUsersPerSec(1) during (5 seconds))).maxDuration(7 seconds)
.protocols(kafkaConf)

I get *5* : "[DEBUG] i.g.c.c.i.Injector - Start user"
And *10* : "[DEBUG] i.g.c.a.Exit - End user"

This explains why the ConsoleDataWriter displays incorrectly:

waiting: 0 / active: -5 / done:10

Buts its not clear why each user "gets exited" twice

The producer was closing the session and then the consumer was.
The session should finish when the consumer has received and verified the Kafka message.
Anyway active users are looking better now :-)

`