What is setApplicationDestinationPrefixes being used for?
<p>I followed a tutorial to implement websockets in my Java Spring application.
It is working fine so far but I really would like to understand what this is used for:</p>

<pre><code>config.setApplicationDestinationPrefixes("/app");
</code></pre>

<p>My whole config looks like this</p>

<pre><code>@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {

  @Override
  public void configureMessageBroker(MessageBrokerRegistry config) {
    config.enableSimpleBroker("/topic");
    config.setApplicationDestinationPrefixes("/app");
  }

  @Override
  public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/hello").withSockJS();
  }
}
</code></pre>

<p>I basically just don't understand the given explanations in spring docs / the tut - e.g.</p>

<blockquote>
  <p>... it designates the "/app" prefix for messages that are bound for @MessageMapping-annotated methods.</p>
</blockquote>