# 2 messages for check coming too quickly

**URL:** <https://community.gatling.io/t/2-messages-for-check-coming-too-quickly/4038>\
**Category:** Gatling (Open-Source)\
**Created:** [November 10, 2017, 9:16am UTC](https://community.gatling.io/t/2-messages-for-check-coming-too-quickly/4038 "2017-11-10T09:16:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dmitriy\_Terekhov](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@Dmitriy\_Terekhov](https://community.gatling.io/u/Dmitriy_Terekhov)\
**Post date:** [November 10, 2017, 9:16am UTC](https://community.gatling.io/t/2-messages-for-check-coming-too-quickly/4038/1 "2017-11-10T09:16:34Z")

</div>

Hi,

I’m working with huge amount of messages (about 6k per second). From time to time by network reasons I’m receiving 2 messages in websocket at exactly same time (up to millisecond). Because of Receiving/Sending queues.  
In my scenario I need to be sure that I have received all messages one by one in a sequence. So code looks pretty simple for such check:

def expectEventWithNextRequestCounter(): ChainBuilder =  
{  
return exitBlockOnFail(exec(  
ws(“Sequence check”)  
.check(  
wsAwait.within(60 seconds).until(1)  
.regex()  
)  
).additionalActions()  
)  
}

during(Configuration.stdScenarioExecTime minutes)  
{  
exec(expectEventWithNextRequestCounter())  
}

And I came to problem: I’m catching 2 messages at same timing. First one was caught by check and analyzed. But second one was skipped because I’m setting next check not right after first one but with small delay regarding to AdditionalActions() method and iteration through during() loop.  
Is there a way to work exactly through every messages in websocket?

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [November 12, 2017, 7:51am UTC](https://community.gatling.io/t/2-messages-for-check-coming-too-quickly/4038/2 "2017-11-12T07:51:34Z")

</div>

WebSocket support is being revamped for Gatling 3. It supports multiple sequential checks.  
[https://github.com/gatling/gatling/blob/master/gatling-http/src/test/scala/io/gatling/http/Ws2CompileTest.scala#L67-L68](https://github.com/gatling/gatling/blob/master/gatling-http/src/test/scala/io/gatling/http/Ws2CompileTest.scala#L67-L68)
