Websocket: Send message to one connection and await response from another

Hi folks!
Not sure that this feature is present in gatling 3.9.5 but here is the scenario:
I have two connections “A” and “B”
I send the message to “A” and expect some response in “B” and based on response will send request to “B”

Is that feasible in current version?

Thank you.
Oleg.

Hello,

No, that’s not possible atm. You can only set a check on connect or after sending an outbound message and it’s performed in this connection.

What you would need would probably be the ability to set checks any time. But that would require some kind of buffering to deal with the gap between sending the “request” and setting the check as the “response” could be received in between.
Could be considered some day.

Hi Stephane,
Thank you for clarifications
Currently how I solve this - after sending the message to A, I’m not setting any checks and immediately send empty message to B and catch the necessary response.

May I know which kind of API you are using ?
If you are using gRPC, please see here.
.
If you are using REST and I am understanding right, you may try to call API B one more time inside API A script and you could put a check there, it would be like

.exec(
       //API A definition - without check
       //you can add pace() if you need API B to wait for API A after it is completed
      exec(
          //API B with a blank body
      ) 
)

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