activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Newsham <jnews...@referentia.com>
Subject programmatic config of memory/temp usage limits
Date Wed, 09 Feb 2011 03:29:35 GMT

We're creating an embedded broker service programmatically.  I want to 
add in memory/temp usage limits, but don't really have the time to test 
the behavior of the broker to see if the settings are working.  Would 
appreciate if someone in the know could have a quick look at this and 
let me know if it'll work.

     brokerService = new BrokerService();
     brokerService.setBrokerName(BROKER_NAME);
     brokerService.setUseJmx(ENABLE_BROKER_JMX);
     brokerService.setUseShutdownHook(false);
     brokerService.setSchedulerSupport(false);
     brokerService.setPersistent(false);

// these are the new lines I'm adding; as you can see from above, we 
don't want/need persistence
     SystemUsage systemUsage = brokerService.getSystemUsage();
     systemUsage.getMemoryUsage().setLimit(MEMORY_STORE_USAGE_LIMIT);
     systemUsage.getTempUsage().setLimit(TEMP_STORE_USAGE_LIMIT);

P.S.  Where do the temp files go?  Are these cleaned up anywhere?

Thanks!
Jim

P.P.S.  I would love to see more documentation on the ActiveMQ site 
regarding programmatic usage of the brokers.

Mime
View raw message