This is a method-level annotation that can be combined with a type-level
@MessageMapping.
Supports the same method arguments as @MessageMapping; however,
subscription messages typically do not have a body.
The return value also follows the same rules as for @MessageMapping,
except if the method is not annotated with
SendTo or
SendToUser, the message is sent directly back to the connected
user and does not pass through the message broker. This is useful for
implementing a request-reply pattern.
Note
When using controller interfaces (e.g. for AOP proxying),
make sure to consistently put all your mapping annotations - such as
@MessageMapping and @SubscribeMapping - on
the controller interface rather than on the implementation class.
org.springframework.messaging.handler.annotation.MessageMapping , org.springframework.messaging.handler.annotation.SendTo , org.springframework.messaging.simp.annotation.SendToUser
| Modifier and Type | Method and Description |
|---|---|
| public String[] |
| value | back to summary |
|---|---|
| public String[] value() Destination-based mapping expressed by this annotation. This is the destination of the STOMP message (e.g. | |