0

I am try to implement a basic web socket app by following this tutorial:https://spring.io/guides/gs/messaging-stomp-websocket/

However, in that tutorial there was a client UI implementation. I don't want to use UI. Instead of the UI, I want to use a websocket client extension in Chrome for sending and seeing messages.

All codes same with the tutorial(except the UI part since I'dont want UI), so I don't rewrite all codes here.

I am able to connect and send message to the url: ws://localhost:8081/gs-guide-websocket for example,

enter image description here

However, I can't get response with this url: ws://localhost:8081/topic/greetings. (I use this URL for getting responses by subscribing it. Because this topic/greetings path used in the UI side of that tutorial for subscription) enter image description here

The Chrome extension that I used is Simple WebSocket Client.

Why I couldn't subscribe the ws://localhost:8081/topic/greetings url? and How can I get messages from the server by using the Chrome client websocket extensions?

javac
  • 441
  • 4
  • 20

1 Answers1

0

Your application works with STOMP and SockJs, this plugin does not support that. It only works with ws. In this example, you can write a simple ws endpoint for your application: example simple ws endpoint