Question regarding using Gatling for Value Chain testing (Polling untill check is set to true before continuing?)

I’m trying to build a chain where I test a system consisting of following:

ComponentA (Storage) → ComponentB (Feed) → ComponentC (Search).

When a new event is posted into ComponentA, it is pushed to ComponentB and eventually it will be available for search in ComponentC (which is reading the feed and indexing new events).
Usually it is around 300ms to 1second from a event is stored in Component A until it is available on the feed on Component B, and around 5 seconds untill it is possible to find the event in component C.

My goal is to create a test that both validates that the chain is working as it should, but also to check the time it takes to complete the tests. (To be able to determine if changes we make to the system is improving the systems performance, or
if we are making it worse).

Component A - B and C are running on different servers:
Component A: host1 - port 9000
Component B: host1 - port 10000
Component C: host2 - port 14000

I’ve been looking at using Group() together with tryMax() for the total duration a chain takes (with the useGroupDurationMetric option set to true). But I think I have misunderstood how to set this up correctly.
Example code (might have spelling errors):

class ValueChain extends Simulation {

object Test {
val test = during(duration) {
group(“Post to feed to search”){

exec(http(“Post event”)
// Read the Feed - check that it contains the ID
tryMax(1000) {
.exec(http(“Read Feed”)
// Search for the createdID
.exec(http(“Perform serach after the createdID”)

val scn = scenario(“Testing chain”).exec(Test.test)


The example give above does not work. What I’m trying to do is:

  1. Post an event to ComponentA
  2. Poll the feed untill it contains the created event
  3. Poll the search untill it has the event as a result.

I’ve also looked at to be attempt to create a back-off delay between retries when polling, but that has unfortunately not worked for me either…

Hopefully someone has an idea of how this should be done correctly. Any help is deeply appreciated!