Skip to content
Permalink
Browse files
ARTEMIS-3720 Exposing global-max-messages on the CLI
  • Loading branch information
clebertsuconic committed Mar 21, 2022
1 parent 3627ba5 commit 0c651dd17b81f9d4f352142adbdff8ebadc1f0f1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 187 deletions.
@@ -287,6 +287,9 @@ public class Create extends InputAbstract {
@Option(name = "--global-max-size", description = "Maximum amount of memory which message data may consume (Default: Undefined, half of the system's memory)")
private String globalMaxSize;

@Option(name = "--global-max-messages", description = "Maximum number of messages that will be accepted in memory before using address full policy mode.(Default: Undefined)")
private long globalMaxMessages = -1;

@Option(name = "--jdbc", description = "It will activate jdbc")
boolean jdbc;

@@ -669,6 +672,8 @@ public Object run(ActionContext context) throws Exception {
filters.put("${encoded.role}", role.replaceAll(" ", "\\\\ "));


filters.put("${global-max-messages}", Long.toString(globalMaxMessages));

if (globalMaxSize == null || globalMaxSize.trim().equals("")) {
filters.put("${global-max-section}", readTextFile(ETC_GLOBAL_MAX_DEFAULT_TXT, filters));
} else {
@@ -4,3 +4,7 @@
You may specify a different value here if you need to customize it to your needs.

<global-max-size>100Mb</global-max-size> -->

<!-- the maximum number of messages accepted before entering full address mode.
if global-max-size is specified the full address mode will be specified by whatever hits it first. -->
<global-max-messages>${global-max-messages}</global-max-messages>
@@ -1,3 +1,8 @@
<!-- the system will enter into page mode once you hit this limit.
This is an estimate in bytes of how much the messages are using in memory -->
<!--
the system will enter into page mode once you hit this limit.
This is an estimate in bytes of how much the messages are using in memory -->
<global-max-size>${global-max-size}</global-max-size>

<!-- the maximum number of messages accepted before entering full address mode.
if global-max-size is specified the full address mode will be specified by whatever hits it first. -->
<global-max-messages>${global-max-messages}</global-max-messages>
@@ -909,7 +909,6 @@
</goals>
<configuration>
<!-- this makes it easier in certain envs -->
<configuration>${basedir}/target/classes/servers/pagingGlobalMaxMessages</configuration>
<allowAnonymous>true</allowAnonymous>
<user>admin</user>
<password>admin</password>
@@ -918,6 +917,8 @@
<!-- this is needed to run the server remotely -->
<arg>--java-options</arg>
<arg>-Djava.rmi.server.hostname=localhost</arg>
<arg>--global-max-messages</arg>
<arg>1000</arg>
</args>
</configuration>
</execution>

This file was deleted.

0 comments on commit 0c651dd

Please sign in to comment.