Websockets drop messages between wsAwait calls?

I have a websocket based scenario that is listening to a server that is constantly pushing messages, which I am trying to process. I have a forever loop that is using wsAwait to capture a fixed amount of messages, and then I process the messages in a following exec(). I then loop back to get more messages. However, I think that maybe messages are getting dropped in between calls to wsAwait.

Is this the case? Is there a way I can capture a stream of messages without dropping any?

Here is a the essence of the code I am using:

forever() {

exec(ws(“receiveMessage”).check(wsAwait.within(wsTimeout seconds).until(receiveCount)


.exec(session => {

[here I do processing of the messages]




Any help is much appreciated.


Oh, I forgot to mention that I am using Gatling 2.3. Has behavior changed in the latest version?

Behavior is still the same in Gatling 3: incoming messages are dropped when there are not check ongoing.
It might be possible to optionally buffer them. Contributions welcome :slight_smile: