so I'm trying to send messages back to my browser from the server and have two methods that are supposed to be wired to send the messages to the STOMP topic.

```
@MessageMapping("/hello")
@SendTo("/topic/greetings")
public static Greeting greeting(HelloMessage message) throws Exception {
    System.out.println("Sending message...");
    Application.startBody(message.getName());
    return new Greeting("Hello, " + message.getName() + "!");
}

@SendTo("/topic/greetings")
public static  Greeting security(String message) {
    System.out.println("entered the informer");
    return new Greeting("bye, " + message + "!");
}

```

The first one is also mapped to receive messages and send one back. The first funciton works and the message makes it back to the browser and displays on the webpage. The second once however, does not work. It never displays a received message in the console of the web page. Can I only send to the same topic with one method? I tried changing the topic and adding a subscription to my Stomp client but that didn't work either. Does it have anything to do with the second method being static? (I need to call it from a separate class.)

This is my subscription in the html file:

```
    function connect() {
        var socket = new SockJS("http://localhost:8080/hello");
        stompClient = Stomp.over(socket);
        stompClient.connect({}, function(frame) {
            setConnected(true);
            console.log('Connected: ' + frame);
            stompClient.subscribe('/topic/greetings', function(greeting){
                showGreeting(JSON.parse(greeting.body).content);
            });
        });
    }

```

And here is my WebSocketConfig.java:

```
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;

@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {

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

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

}

```