Rossen Stoyanchev opened SPR-11085 and commented
A common expected pattern when using @SendTo
and @SendToUser
is to broadcast to the same destination as the input message but a different prefix.
For example the client may send a message to "/app/foo" where the prefix "/app" is removed for mapping purposes. The return value from the method may then be broadcast to "/topic/foo" where "/topic" is a default prefix configurable on SendToMethodReturnValueHandler
. The message handling method would then simply be:
@MessageMapping("/foo")
public String handleFoo() {
return "foo";
}
Affects: 4.0 RC1
Referenced from: commits 72dec7d