spring - WebSocketMessageBrokerStats - how to set loggingPeriod -
how set loggingperiod in websocketmessagebrokerstats decrease value (default 30')
websocketmessagebrokerstats loaded @bean in websocketmessagebrokerconfigurationsupport
version : spring 4.2.0.release
my current config :
@configuration @enablewebsocketmessagebroker @enablescheduling public class appwebsocketconfig extends abstractwebsocketmessagebrokerconfigurer { @override public void configuremessagebroker(final messagebrokerregistry config) { config.enablesimplebroker("/topic"); } @override public void registerstompendpoints(final stompendpointregistry registry) { registry.addendpoint("/entry") .setallowedorigins("*") .withsockjs() .setdisconnectdelay(10000); } }
according websocketmessagebrokerstats javadoc:
this class declared spring bean above configuration name "websocketmessagebrokerstats"
so can add configuration class:
@autowired private websocketmessagebrokerstats websocketmessagebrokerstats; @postconstruct public void init() { websocketmessagebrokerstats.setloggingperiod(10 * 1000); // desired time in millis }
Comments
Post a Comment