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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -