Toast Message is not created when message received at Java Websocket server in Android

I am trying to create basic WebSocket server with this library. I want to make a toast message when a message is received. In onMessage() function below I have implemented that. But no toast message …

prevent org.springframework.messaging.MessagingException print stack trace

i am currently writing a websocket project using spring boot. And i have a websocket authentication config as this: @EnableWebSocketMessageBroker @Order(Ordered.HIGHEST_PRECEDENCE + 99) public class …