How can I proactively receive messages from the server

Issue #235 on hold
1336230737 created an issue

I used WebSocket Request-Response Sampler and other WebSocket Sampler. But none of them can actively receive the messages pushed by the server。I set up a Websocket connection to send ping/pong every 25 seconds. But with this WS connection, the server will send other messages to the client (JMTER) from time to time. So, how can I receive server messages in JMeter in a timely manner without using a loop controller to request them all the time

Comments (8)

  1. 1336230737 reporter

    Is there any variable that can be used as a condition to listen for messages coming from the server? When a message is sent from the server and I'm listening, I use the WebSocket Single read-sample to read it, instead of using the while controller to keep sending the WebSocket Single read-sampler to fetch it, which takes up too much resources

  2. Peter Doornbosch repo owner

    Too much resources??? What are you talking about? I really don’t get what the problem is. The only way for detecting there is a message is trying to read it. That’s it. It doesn’t take much resources, it’s just a blocking read (with a timeout).

  3. Log in to comment