I might be wrong, but just trying.
How about if you start your own broker instance through

BrokerService broker = new BrokerService();
broker.setBrokerName("fast");
broker.getSystemUsage().getMemoryUsage().setLimit(64*1024*1024);
PolicyEntry policy = new PolicyEntry();
policy.setMemoryLimit(4 * 1024 *1024); // 4 * 1024 *1024 -> replace with a
variable
policy.setProducerFlowControl(false);
PolicyMap pMap = new PolicyMap();
pMap.setDefaultEntry(policy);
broker.setDestinationPolicy(pMap);
broker.addConnector("tcp://localhost:61616");
broker.start();

and expose the variable with JMX.

Using Spring and MBeanServer should be pretty easy - not sure if it will
work. :)

Cheers,
Eugene. 

--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-Admin-or-commandline-jmx-to-configure-memoryLimit-at-run-time-tp4085287p4091755.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to