Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring WebSockets Runtime Monitoring STOMP Frames - explanation

I'm working on an application who uses websockets. I've implemented the STOMP sub-protocol in my web application and it's working just fine.

The clients are disconnecting from the socket correctly but my server is throwing a LOG which I do not understand well even if I read the Spring documentation in this topic.

so.. the section im trying to understand is this: 25.4.16 Runtime Monitoring from this doc: http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html

and the LOG that my server is throwing is represented by this:

INFORMACIÓN: WebSocketSession[2 current WS(2)-HttpStream(0)-HttpPoll(0), 7 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(7)-CONNECTED(7)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 66], outboundChannelpool size = 0, active threads = 0, queued tasks = 0, completed tasks = 16], sockJsScheduler[pool size = 4, active threads = 1, queued tasks = 3, completed tasks = 2443]

So.. following the explanation of the docs, I understand that this part of the LOG: WebSocketSession[2 current WS(2) represent that I have 2 clients currently on my socket right? but when I read this: stompSubProtocol[processed CONNECT(7)-CONNECTED(7)-DISCONNECT(0)] I get totalyconfused.

So that means that I have 7 clients connected under the sub-protocol? or that I had 7 clients?

also I want to know how to customize the default time the log appears. By default its 30 minuts, how can I change that? or catch every single thing on the runtime monitoring?

appreciate your help.

like image 854
Daniel Henao Avatar asked Jan 19 '26 07:01

Daniel Henao


1 Answers

I think this just is a count of the total number of frames of each type (CONNECT, CONNECTED, DISCONNECT) that have been received from the STOMP client. From the looks of it you only have 2 connected web socket clients WebSocketSession[2 current WS(2)...

like image 151
Matt Slater Avatar answered Jan 20 '26 20:01

Matt Slater



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!