Skip to content

Commit

Permalink
fix the issue #1 about XMX and XMS
Browse files Browse the repository at this point in the history
  • Loading branch information
disaster37 committed Jan 10, 2015
1 parent 1696e1a commit 1246f54
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog

**v6.6.1**
**v1.0.1
- Add environment variabale to set MIN and MAX memory for ActiveMQ (issue #1)

**v1.0.0**
- upgraded to ActiveMQ 5.10.0
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ Current Version: **5.10.0**
- 512MB is too little memory, i think is to use ActiveMQ on test environment
- **1GB** is the **standard** memory size

You can set the memory that you need :

```bash
docker run ... \
-e 'ACTIVEMQ_MIN_MEMORY=512' \
-e 'ACTIVEMQ_MAX_MEMORY=2048'

```
This sample lauch ActiveMQ in docker with 512 MB of memory, and then ACtiveMQ can take 2048 MB of max memory

## Storage

The necessary hard drive space depends if you use persistant message or not and the type of appender. Normaly, no need space for ActiveMQ because the most data are contains directly on memory.
Expand Down Expand Up @@ -174,6 +184,8 @@ Below is the complete list of available options that can be used to customize yo
- **ACTIVEMQ_TEMP_USAGE**: The maximum amount of space temp the broker will use before disabling caching and/or slowing down producers. Default to `50 gb`
- **ACTIVEMQ_MAX_CONNECTION**: It's DOS protection. It limit concurrent connections. Default to `1000`
- **ACTIVEMQ_FRAME_SIZE**: It's DOS protection. It limit the frame size. Default to `104857600` (100MB)
- **ACTIVEMQ_MIN_MEMORY**: The init memory in MB that ActiveMQ take when start (it's like XMS). Default to `128` (128 MB)
- **ACTIVEMQ_MAX_MEMORY**: The max memory in MB that ActiveMQ can take (it's like XMX). Default to `1024` (1024 MB)

- **ACTIVEMQ_ADMIN_LOGIN**: The login for admin account (broker and web console). Default to `admin`
- **ACTIVEMQ_ADMIN_PASSWORD**: The password for admin account. Default to `admin`
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.10.05.10.05.10.05.10.05.10.0
5.10.0
4 changes: 2 additions & 2 deletions assets/bin/wrapper.conf
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ wrapper.java.additional.12=-Djava.security.auth.login.config=%ACTIVEMQ_CONF%/log
#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
wrapper.java.initmemory={{ACTIVEMQ_MIN_MEMORY}}}

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024
wrapper.java.maxmemory={{ACTIVEMQ_MAX_MEMORY}}

# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=org.apache.activemq.console.Main
Expand Down
7 changes: 6 additions & 1 deletion assets/init
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ ACTIVEMQ_STORAGE_USAGE=${ACTIVEMQ_STORAGE_USAGE:-"100 gb"}
ACTIVEMQ_TEMP_USAGE=${ACTIVEMQ_TEMP_USAGE:-"50 gb"}
ACTIVEMQ_MAX_CONNECTION=${ACTIVEMQ_MAX_CONNECTION:-1000}
ACTIVEMQ_FRAME_SIZE=${ACTIVEMQ_FRAME_SIZE:-104857600}

ACTIVEMQ_MIN_MEMORY=${ACTIVEMQ_MIN_MEMORY:-128}
ACTIVEMQ_MAX_MEMORY=${ACTIVEMQ_MAX_MEMORY:-1024}

# Users settings
ACTIVEMQ_ADMIN_LOGIN=${ACTIVEMQ_ADMIN_LOGIN:-admin}
Expand Down Expand Up @@ -111,7 +112,11 @@ else
sudo -u activemq -H sed 's/{{ACTIVEMQ_PERSISTENT_DESTINATION}}/'""'/' -i conf/activemq.xml
fi

# We setting the wrapper.conf file (this is the main setting of wrapper)
sudo -u activemq -H sed 's/{{ACTIVEMQ_MIN_MEMORY}}/'"${ACTIVEMQ_MIN_MEMORY}"'/' -i bin/linux-x86-64/wrapper.conf
sudo -u activemq -H sed 's/{{ACTIVEMQ_MAX_MEMORY}}/'"${ACTIVEMQ_MAX_MEMORY}"'/' -i bin/linux-x86-64/wrapper.conf

# We fix some problem about right
chown -R activemq:activemq ${ACTIVEMQ_DATA}
chown -R activemq:activemq ${ACTIVEMQ_LOG}
chown -R activemq:activemq ${ACTIVEMQ_CONF}
Expand Down

0 comments on commit 1246f54

Please sign in to comment.