title: Path variables in Spring WebSockets @SendTo mapping
body: <p>I have, what I think to be, a very simple Spring WebSocket application.  However, I'm trying to use path variables for the subscription as well as the message mapping.</p>
  
  <p>I've posted a paraphrased example  below. I would expect the <code>@SendTo</code> annotation to return back to the subscribers based on their <code>fleetId</code>.  ie, a <code>POST</code> to <code>/fleet/MyFleet/driver/MyDriver</code> should notify subscribers of <code>/fleet/MyFleet</code>, but I'm not seeing this behavior.</p>
  
  <p>It's worth noting that subscribing to literal <code>/fleet/{fleetId}</code> works.  Is this intended?  Am I missing some piece of configuration?  Or is this just not how it works?</p>
  
  <p>I'm not very familiar with WebSockets or this Spring project yet, so thanks in advance.</p>
  
  <p><strong>Controller.java</strong></p>
  
  <pre><code>...
  @MessageMapping("/fleet/{fleetId}/driver/{driverId}")
  @SendTo("/topic/fleet/{fleetId}")
  public Simple simple(@DestinationVariable String fleetId, @DestinationVariable String driverId) {
      return new Simple(fleetId, driverId);
  }
  ...
  </code></pre>
  
  <p><strong>WebSocketConfig.java</strong></p>
  
  <pre><code>@Configuration
  @EnableWebSocketMessageBroker
  public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
      @Override
      public void configureMessageBroker(MessageBrokerRegistry config) {
          config.enableSimpleBroker("/topic");
          config.setApplicationDestinationPrefixes("/live");
      }
  
      @Override
      public void registerStompEndpoints(StompEndpointRegistry registry) {
          registry.addEndpoint("/fleet").withSockJS();
      }
  }
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>var socket = new SockJS('/fleet');
  var stompClient = Stomp.over(socket);
  stompClient.connect({}, function(frame) {
      // Doesn't Work
      stompClient.subscribe('/topic/fleet/MyFleet', function(greeting) {
      // Works
      stompClient.subscribe('/topic/fleet/{fleetId}', function(greeting) {
          // Do some stuff
      });
  });
  </code></pre>
  
  <p><strong>Send Sample</strong></p>
  
  <pre><code>    stompClient.send("/live/fleet/MyFleet/driver/MyDriver", {}, JSON.stringify({
          // Some simple content
      }));
  </code></pre>