Spring websocket send message from async method
<p>I am using spring websocket 4.2.4 with sockjs and stomp and i am trying to send a message from the server to all the subscribers in an async task with no luck</p>

<p>my class is:</p>

<pre><code>public class MyClass{
    private timer;
    public MyClass(){
        this.timer = new Timer();
    }

    @Async
    public void myMethod(){
        timer.schedule(new MyReminder(), 1000);
    }

    @Async
    private class MyReminder extends TimerTask{

        @Autowired
        SimpMessagingTemplate messageingTemplate;

        @Override
        public void run(){
            messageingTemplate.convertAndSend("/app/subscribers","message");
        }
    }
}
</code></pre>

<p>but the subscribers dont get the message</p>

<p>any help? what did i do wrong :(</p>

<p><strong>* EDIT *</strong></p>

<p>my message broker:</p>

<pre><code>public void configureMessageBroker(MessageBrokerRegistry config){ 
    config.enableSimpleBroker("/topic","/myApp"); 
    config.setApplicationDestinationPrefixes("/myApp");
}
</code></pre>

<p>and when i subscribe: </p>

<pre><code>subscribe("myApp/someRoute") 
</code></pre>

<p>thanks!!</p>

<p>** Edit 2: **</p>

<p>thanks for the help i fix the problem :)</p>