I'm experimenting with Spring 4 WebSocket STOMP application. Is there a way to reply to a single unauthenticated user on condition that each user has unique session ID? Right now I can only either broadcast a message or send it directly to an authenticated user.
@Controller
public class ProductController {
@MessageMapping("/products/{id}")
@SendTo("/topic") // This line makes return value to be broadcasted to every connected user.
public String getProduct(@DestinationVariable int id) {
return "Product " + id;
}
}