This is an automated email from the ASF dual-hosted git repository.

chibenwa pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git


The following commit(s) were added to refs/heads/master by this push:
     new e9a217ac32 JAMES-4200 Allow to configure ActiveMQ temp usage and use 
sain default of 5GB (#3048)
e9a217ac32 is described below

commit e9a217ac32464916ab783358cca7a475ece1a3ea
Author: Trần Hồng Quân <[email protected]>
AuthorDate: Mon May 25 20:04:48 2026 +0700

    JAMES-4200 Allow to configure ActiveMQ temp usage and use sain default of 
5GB (#3048)
    
    Having issue running Postgres app + ActiveMQ test on my local where 
ActiveMQ requires at least 50GB disk space for temp usage.
    
    [ERROR] o.a.a.b.BrokerService - Failed to start Apache ActiveMQ (james, 
broker)
    org.apache.activemq.ConfigurationException: Temporary Store limit is 51200 
mb (current store usage is 0 mb). The data directory: 
/var/folders/gc/8hsr6kl562z1256yyln6zsjw0000gp/T/junit14491696456592830986/junit15056881861971645047/var/store/activemq/brokers
 only has 16805 mb of usable space.
            at 
org.apache.activemq.broker.BrokerService.checkUsageLimit(BrokerService.java:2127)
            at 
org.apache.activemq.broker.BrokerService.checkTmpStoreUsageLimits(BrokerService.java:2058)
            at 
org.apache.activemq.broker.BrokerService.checkStoreSystemUsageLimits(BrokerService.java:2200)
            at 
org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:776)
            at 
org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:732)
            at 
org.apache.activemq.broker.BrokerService.start(BrokerService.java:630)
            at 
org.apache.james.queue.activemq.EmbeddedActiveMQ.launchEmbeddedBroker(EmbeddedActiveMQ.java:122)
            at 
org.apache.james.queue.activemq.EmbeddedActiveMQ.<init>(EmbeddedActiveMQ.java:59)
---
 .../main/java/org/apache/james/queue/activemq/EmbeddedActiveMQ.java   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/EmbeddedActiveMQ.java
 
b/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/EmbeddedActiveMQ.java
index a65cc61409..ac6f1d9558 100644
--- 
a/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/EmbeddedActiveMQ.java
+++ 
b/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/EmbeddedActiveMQ.java
@@ -45,7 +45,9 @@ public class EmbeddedActiveMQ {
     private static final String BROKER_NAME = "james";
     private static final String BROCKER_URI = "tcp://localhost:0";
     private static final String STORE_USAGE_LIMIT_PROPERTY = 
"james.activemq.store.usage.limit.bytes";
+    private static final String TEMP_USAGE_LIMIT_PROPERTY = 
"james.activemq.temp.usage.limit.bytes";
     private static final long DEFAULT_STORE_USAGE_LIMIT_BYTES = 10L * 1024 * 
1024 * 1024; // 10 GB
+    private static final long DEFAULT_TEMP_USAGE_LIMIT_BYTES = 5L * 1024 * 
1024 * 1024; // 5 GB
 
     private final ActiveMQConnectionFactory activeMQConnectionFactory;
     private final PersistenceAdapter persistenceAdapter;
@@ -106,7 +108,9 @@ public class EmbeddedActiveMQ {
         brokerService.setSchedulerSupport(false);
         
brokerService.setAdjustUsageLimits(configuration.isAdjustUsageLimits());
         long storeUsageLimitBytes = Long.getLong(STORE_USAGE_LIMIT_PROPERTY, 
DEFAULT_STORE_USAGE_LIMIT_BYTES);
+        long tempUsageLimitBytes = Long.getLong(TEMP_USAGE_LIMIT_PROPERTY, 
DEFAULT_TEMP_USAGE_LIMIT_BYTES);
         
brokerService.getSystemUsage().getStoreUsage().setLimit(storeUsageLimitBytes);
+        
brokerService.getSystemUsage().getTempUsage().setLimit(tempUsageLimitBytes);
         brokerService.setBrokerId(BROKER_ID);
         String[] uris = {BROCKER_URI};
         brokerService.setTransportConnectorURIs(uris);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to