# Asynchronous scenario for Kafka consumer

**URL:** <https://community.gatling.io/t/asynchronous-scenario-for-kafka-consumer/9304>\
**Category:** Gatling (Open-Source)\
**Created:** [September 23, 2024, 2:59pm UTC](https://community.gatling.io/t/asynchronous-scenario-for-kafka-consumer/9304 "2024-09-23T14:59:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![noldw](https://avatars.discourse-cdn.com/v4/letter/n/9de053/32.png) [@noldw](https://community.gatling.io/u/noldw)\
**Post date:** [September 23, 2024, 2:59pm UTC](https://community.gatling.io/t/asynchronous-scenario-for-kafka-consumer/9304/1 "2024-09-23T14:59:06Z")

</div>

Hi,

I’ve used Gatling in the past for testing a synchrous rest api application, and i’m wondering if i should use it for my current project.

I’m working on a Spring Boot application that consumes Kafka messages, converts these and forwards them to a SAP rest endpoint.  
I’d like to run some Gatling load on it. The first part is pretty simple, I saw that there is a Kafka plugin which can generate load.  
Since that is an asynchronous process the verification part is harder: the definition of performance is the time taken before a message (or all messages) are posted to the SAP endpoint. But how to meassure that, how does the Gatling scenario/dsl know that that call is made?  
I guess i need a (mock) endpoint in Gatling to catch the post to the SAP system (I can map these calls to the inital Kafka message). Is such construct possible?  
Or are there other options?

**Gatling version** : 3.11.5 (must be up to date)  
**Gatling flavor** : [x] java kotlin scala javascript typescript  
**Gatling build tool** : [x] maven gradle sbt bundle npm

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/2X/b/b148e0742de35c6280726cabf3ecd3de2d320f63.png) [@system](https://community.gatling.io/u/system)\
**Post date:** [October 23, 2024, 2:59pm UTC](https://community.gatling.io/t/asynchronous-scenario-for-kafka-consumer/9304/2 "2024-10-23T14:59:57Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
