Skip to content

Commit 941186a

Browse files
committed
Minor update to STOMP chapter
Issue: SPR-16681
1 parent 27fc4d6 commit 941186a

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/docs/asciidoc/web/websocket.adoc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,9 +1929,10 @@ will typically notice the broker is not responding within 10 seconds. Clients ne
19291929
implement their own reconnect logic.
19301930
====
19311931

1932-
Furthermore, an application can directly intercept every incoming and outgoing message by
1933-
registering a `ChannelInterceptor` on the respective message channel. For example
1934-
to intercept inbound messages:
1932+
The above events reflect points in the lifecycle of a STOMP connection. They're not meant
1933+
to provide notification for every message sent from the client. Instead an application
1934+
can register a `ChannelInterceptor` to intercept every incoming and outgoing STOMP message.
1935+
For example to intercept inbound messages:
19351936

19361937
[source,java,indent=0]
19371938
[subs="verbatim,quotes"]
@@ -1947,8 +1948,7 @@ to intercept inbound messages:
19471948
}
19481949
----
19491950

1950-
A custom `ChannelInterceptor` can extend the empty method base class
1951-
`ChannelInterceptorAdapter` and use `StompHeaderAccessor` or `SimpMessageHeaderAccessor`
1951+
A custom `ChannelInterceptor` can use `StompHeaderAccessor` or `SimpMessageHeaderAccessor`
19521952
to access information about the message.
19531953

19541954
[source,java,indent=0]
@@ -1966,6 +1966,12 @@ to access information about the message.
19661966
}
19671967
----
19681968

1969+
Note that just like with the `SesionDisconnectEvent` above, a DISCONNECT message
1970+
may have been sent from the client, or it may also be automatically generated when
1971+
the WebSocket session is closed. In some cases an interceptor may intercept this
1972+
message more than once per session. Components should be idempotent with regard to
1973+
multiple disconnect events.
1974+
19691975

19701976

19711977
[[websocket-stomp-client]]

0 commit comments

Comments
 (0)