Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocketMessageBrokerStats does not work unless SockJS is enabled with WebSocket XML namespace [SPR-14190] #18763

spring-issuemaster opened this issue Apr 19, 2016 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Apr 19, 2016

Joe Sweden opened SPR-14190 and commented

In the Spring reference documentation for Websockets it states:

When using @EnableWebSocketMessageBroker or websocket:message-broker key infrastructure components automatically gather stats and counters that provide important insight into the internal state of the application. The configuration also declares a bean of type WebSocketMessageBrokerStats that gathers all available information in one place and by default logs it at INFO level once every 30 minutes.

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

Reference URL:

Referenced from: commits 9fa0614, 8f0f5fa

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 26, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.