# Info check in the subscribe mode websocket (Gatling version 3.2) STRESS TEST IN memory Broker

**URL:** <https://community.gatling.io/t/info-check-in-the-subscribe-mode-websocket-gatling-version-3-2-stress-test-in-memory-broker/5795>\
**Category:** Gatling (Open-Source)\
**Created:** [September 12, 2020, 6:20pm UTC](https://community.gatling.io/t/info-check-in-the-subscribe-mode-websocket-gatling-version-3-2-stress-test-in-memory-broker/5795 "2020-09-12T18:20:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastiano\_Ippolito](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Sebastiano\_Ippolito](https://community.gatling.io/u/Sebastiano_Ippolito)\
**Post date:** [September 12, 2020, 6:20pm UTC](https://community.gatling.io/t/info-check-in-the-subscribe-mode-websocket-gatling-version-3-2-stress-test-in-memory-broker/5795/1 "2020-09-12T18:20:23Z")

</div>

Hi,  
I’am running 2 scenario

1. One HTTP that sends a lot of notifications (in broadcasting)

2. One WEB Socket that receives the notifications in real-time.

3. **scnNotificationGeneration** produces N notifications in S seconds

4. **scnUserReceiverWs** with this check:

val answerEventCheck = ws.checkTextMessage("\<\<RECEIVER Notification received")  
.check(regex("^a._MESSAGE_._testing._"))

capture only M notifications where M\<N (N are all notifications waited)

When the WebSocket scenario call the SUBSCRIBE method, in this part receive the notifications: with this code I receive not all the notifications waited (N) but only a part of them and then the scenario web socket ends with the disconnect.

I would modify this part:

.exec(ws("\<\<RECEIVER - SUBSCRIBE")  
.sendText("[“SUBSCRIBE\n”+“X-Authorization”+":"+"${X-Authorization}"+"\nid:sub-0\ndestination:/topic/messages\n\n\u0000"]")  
.await(seconds seconds)(answerEventCheck)  
)

and await until the HTTP scenario ends or when I recevied all notifications waited (real-time in broadcast generated from the sender).

I have the counter of notifications and then I can check the notification received in the SUBSCRIBE answerEventCheck.

Any suggest?

I use the 3.2 Gatling version

The goal of this STRESS Test is to stress ON-MEMORY broker STOMP in order to understand where is the load maximum of notifications.

Regards.

Sebastiano.

[StompRealTimeStressTest.txt](https://community.gatling.io/uploads/short-url/goN8uDoWOwn3LnU6iGtEYKutYYR.txt) (7.88 KB)
