Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
WebSocketMessageBrokerStats does not work unless SockJS is enabled with WebSocket XML namespace [SPR-14190] #18763
In the Spring reference documentation for Websockets it states:
we are using a websocket:message-broker but the INFO log is never performed. This was unexpected after reading the above documentation, but was fixed by adding sockJS. It probably should be clarified that this logging is actually ONLY performed if you have configured sockJS. The SockJS Task Scheduler is used to to the logging, and if the websocket:sockjs/ tag is not in the websocket context file, this Scheduler is null. I don't know if this is unintended in the code or not, but at least the documentation should be clearer on this point.
Affects: 4.2.5, 4.3 RC1
Rossen Stoyanchev commented
I'm changing this to a bug. It just happens that SockJS registers the TaskScheduler that the WebSocketMessageBrokerStats needs. However this should work regardless of whether SockJS is enabled or not. That's the way it works in the WebSocket Java config.