# Listening to web socket messages without sending anything in Gatling 3.0

**URL:** <https://community.gatling.io/t/listening-to-web-socket-messages-without-sending-anything-in-gatling-3-0/5522>\
**Category:** Gatling (Open-Source)\
**Created:** [March 4, 2020, 5:11am UTC](https://community.gatling.io/t/listening-to-web-socket-messages-without-sending-anything-in-gatling-3-0/5522 "2020-03-04T05:11:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishal\_Antony](https://avatars.discourse-cdn.com/v4/letter/v/aca169/32.png) [@Vishal\_Antony](https://community.gatling.io/u/Vishal_Antony)\
**Post date:** [March 4, 2020, 5:11am UTC](https://community.gatling.io/t/listening-to-web-socket-messages-without-sending-anything-in-gatling-3-0/5522/1 "2020-03-04T05:11:32Z")

</div>

I have a use case where I just want to listen to web socket messages.  
I send messages to the service over HTTP protocol and expect some response over WebSocket.  
But I am unable to do this in Gatling v3.0. I can only send messages and expect something. I don’t have anything to send over WebSocket.

Something like this:

**scenario(“open websocket and check incoming messages”)**  
**.exec(feed(feeder))**  
**.exec(openWebSocket)**  
**.pause(1)**  
**.repeat("${wsMessagesCount}") {**  
**exec(publishMessage())**  
**.pause(1)**  
**.exec(**  
**ws(“Listen”)**  
**.await(CheckMsgWaitTime)(**  
**wsCheckMsg**  
**)**  
**)**

**}**  
**.exec(closeWebSocket)**

Can someone please help?

---

<div class="post-metadata">

**Author:** ![Vladimir\_Karpovitch](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@Vladimir\_Karpovitch](https://community.gatling.io/u/Vladimir_Karpovitch)\
**Post date:** [March 27, 2020, 7:30pm UTC](https://community.gatling.io/t/listening-to-web-socket-messages-without-sending-anything-in-gatling-3-0/5522/2 "2020-03-27T19:30:02Z")

</div>

It seems like there is no way to listen the WS connection without sending messages to the server as ‘await’ has to be connected with ‘sendText’. I tried to add several checks to the one ‘sentText’ but they all listen the first answer message from the server and the following seems to be received to the /dev/null.
