diff --git a/src/asciidoc/web-websocket.adoc b/src/asciidoc/web-websocket.adoc index 46d36c5b30f..a86ce85048d 100644 --- a/src/asciidoc/web-websocket.adoc +++ b/src/asciidoc/web-websocket.adoc @@ -2110,9 +2110,10 @@ will typically notice the broker is not responding within 10 seconds. Clients ne implement their own reconnect logic. ==== -Furthermore, an application can directly intercept every incoming and outgoing message by -registering a `ChannelInterceptor` on the respective message channel. For example -to intercept inbound messages: +The above events reflect points in the lifecycle of a STOMP connection. They're not meant +to provide notification for every message sent from the client. Instead an application +can register a `ChannelInterceptor` to intercept every incoming and outgoing STOMP message. +For example to intercept inbound messages: [source,java,indent=0] [subs="verbatim,quotes"] @@ -2147,6 +2148,12 @@ to access information about the message. } ---- +Note that just like with the `SesionDisconnectEvent` above, a DISCONNECT message +may have been sent from the client, or it may also be automatically generated when +the WebSocket session is closed. In some cases an interceptor may intercept this +message more than once per session. Components should be idempotent with regard to +multiple disconnect events. + [[websocket-stomp-client]]