Spring boot Websocket project with Maven
mvn clean install
- Go to
UpstoxOHApp.java
and run using java main method
ws://localhost:8080/upstox/websocket
WebSocketConfig.java
TradeController.java
have websocket endpoint /app/trades
- /topic/ohlc
Step 1: Start the UpstoxOhlcApp.java
application using java main method.
Step 1: Start the test WebsocketClient.java
Client using java main method.
How its works
OHLCTradeStompSessionHandler.java
is the test handler which containsSubscription.java
and handleFrame method show the subscribed data (TradeOHLCResponse.java
).