title: Spring boot WebSocket using Stomp, unable to receive messages
body: <p>I have created a WebSocket server that is located on: <code>/server</code>.</p>
  <p>I have also created a controller that has a route that maps messages from <code>/stompserver/sendmessage/{to}</code>
  to the channel <code>/subscriber/{to}</code></p>
  <p>I can see that the WebSocket server is up, and I'm able to subscribe to any channel I want, but it seems to be that the route <code>/stompserver/sendmessage/{to}</code> is not getting invoked.</p>
  <p>This code was working for me before and I don't remember what I've changed.</p>
  <p>This is my code:</p>
  <pre><code>@Controller
  @Slf4j
  public class ArduinoControllerV1 {
      Logger logger = LoggerFactory.getLogger(ArduinoControllerV1.class);
      @Autowired
      private SimpMessagingTemplate messagingTemplate;
  
  
      @MessageMapping(&quot;/sendmessage/{to}&quot;)
      @RequestMapping(&quot;/sendmessage/{to}&quot;)
      public void sendMessage(@DestinationVariable String to, String message) {
          logger.info(message.toString() + &quot; to &quot; + to);
          messagingTemplate.convertAndSend(&quot;/subscriber/&quot; + to, message);
  
  
      }
  
  }
  </code></pre>
  <p>Configuration:</p>
  <pre><code>@Configuration
  @EnableWebSocketMessageBroker
  public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
  
      @Override
      public void configureMessageBroker(MessageBrokerRegistry config) {
          config.enableSimpleBroker(&quot;/stompserver&quot;);
      }
  
      @Override
      public void registerStompEndpoints(StompEndpointRegistry registry) {
          registry.addEndpoint(&quot;/server&quot;).setAllowedOriginPatterns(&quot;*&quot;).withSockJS();
      }
  
      @Bean
      public WebMvcConfigurer corsConfigurer() {
          return new WebMvcConfigurerAdapter() {
              @Override
              public void addCorsMappings(CorsRegistry registry) {
                  registry.addMapping(&quot;/**&quot;).allowedOrigins(&quot;*&quot;);
              }
          };
      }
  
  }
  </code></pre>
  <p>I'm using <a href="https://github.com/jiangxy/websocket-debug-tool" rel="nofollow noreferrer">WebSocket Debug tool</a> as a client, to send and receive messages.</p>
  <p>Thanks for your help in advance.</p>