Skip to content

Commit c97acbb

Browse files
committed
Fix documentatio issue
1 parent 03c3051 commit c97acbb

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/docs/asciidoc/web/websocket.adoc

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,18 +1296,14 @@ See <<websocket-stomp-handle-send>>.
12961296
[[websocket-stomp-subscribe-mapping]]
12971297
==== `@SubscribeMapping`
12981298

1299-
`@SubscribeMapping` is used together with `@MessageMapping` to narrow the mapping to
1300-
subscription messages. In this scenario `@MessageMapping` expresses message destination
1301-
mappings for routing purposes, which can be done at the class or at the method level,
1302-
while `@SubscribeMapping` narrows the mapping to subscription messages only.
1303-
1304-
Methods with `@MessageMapping` and `@SubscribeMapping` support the same
1305-
<<websocket-stomp-message-mapping,method arguments>> as methods annotated only with
1306-
`@MessageMapping` do. However for the return value, in the absence of `@SendTo` and
1299+
`@SubscribeMapping` is similar to `@MessageMapping` but also narrows the mapping to
1300+
subscription messages only. Methods with `@SubscribeMapping` support the same
1301+
<<websocket-stomp-message-mapping,method arguments>> as `@MessageMapping` methods do.
1302+
The main difference is that for the return value, in the absence of `@SendTo` and
13071303
`@SendToUser`, a message is sent directly as a reply to the subscription, via the
1308-
"clientOutboundChannel" channel. Effectively the subscription is used as a one-time,
1309-
request-reply message exchange with the subscription never stored. This is useful for
1310-
loading data on startup and for initializing a front-end UI.
1304+
"clientOutboundChannel" channel. Effectively in this case the subscription is used as
1305+
a one-time, request-reply message exchange with the subscription never stored.
1306+
This is useful for loading data on startup and for initializing a front-end UI.
13111307

13121308
If an `@SubscribeMapping` method is annotated with `@SendTo` and `@SendToUser` the return
13131309
value is sent to the `"brokerChannel"` as usual, sending a message subscribers of the

0 commit comments

Comments
 (0)