I am having an issue when starting up the broker of ActiveMQ. I get this error:
ERROR BrokerService - Temporary Store limit is 51200 mb...
Here is what I already know:
I know that you can fix this by changing the activemq broker xml configuration file, but the problem I am having is that I don't know where the file is. I am developing in an Eclipse workspace with Maven (m2eclipse extension) so I can't see the binaries in the eclipse workspace folders.
For some reason, even though this is a "warning", my broker is no longer receiving messages. I know that this error is causing the problem because if I run the code on another machine, it works as I expect. (The other machine is running CentOS and I am having problems on windows if that is relevant)
Maybe is there a way to change this parameter at run time?
Here is how I am starting the broker:
BrokerService broker = new BrokerService();
broker.addConnector(Constants.ACTIVEMQ_URL);
broker.setPersistent(false);
broker.start();
Thanks!
It is better to set the system usage after the broker.setPersistent(false). In case one would change the order and the space is lower then the limit, another message will occur.
BrokerService broker = new BrokerService();
broker.addConnector(Constants.ACTIVEMQ_URL);
broker.setPersistent(false);
SystemUsage systemUsage = brokerService.getSystemUsage();
systemUsage.getStoreUsage().setLimit(1024 * 1024 * 8);
systemUsage.getTempUsage().setLimit(1024 * 1024 * 8);
broker.start();