ARTEMIS-4100 improve consistency & wording for CLI
This commit is contained in:
parent
51a3c6a351
commit
30f6d80696
|
@ -36,7 +36,7 @@ public abstract class ActionAbstract implements Action {
|
|||
|
||||
public static final String DEFAULT_BROKER_ACCEPTOR = "artemis";
|
||||
|
||||
@Option(name = "--verbose", description = "Adds more information on the execution")
|
||||
@Option(name = "--verbose", description = "Print additional information.")
|
||||
public boolean verbose;
|
||||
|
||||
private String brokerInstance;
|
||||
|
|
|
@ -45,10 +45,10 @@ public abstract class Configurable extends ActionAbstract {
|
|||
|
||||
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
@Arguments(description = "Broker Configuration URI, default 'xml:${ARTEMIS_INSTANCE}/etc/bootstrap.xml'")
|
||||
@Arguments(description = "Broker Configuration URI. Default: xml:${ARTEMIS_INSTANCE}/etc/bootstrap.xml.")
|
||||
String configuration;
|
||||
|
||||
@Option(name = "--broker", description = "This would override the broker configuration from the bootstrap")
|
||||
@Option(name = "--broker", description = "Override the broker configuration from the bootstrap.xml.")
|
||||
String brokerConfig;
|
||||
|
||||
@Inject
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.apache.activemq.artemis.utils.FileUtil;
|
|||
/**
|
||||
* CLI action that creates a broker instance directory.
|
||||
*/
|
||||
@Command(name = "create", description = "creates a new broker instance")
|
||||
@Command(name = "create", description = "Create a new broker instance.")
|
||||
public class Create extends InstallAbstract {
|
||||
|
||||
private static final Integer DEFAULT_PORT = 61616;
|
||||
|
@ -110,127 +110,127 @@ public class Create extends InstallAbstract {
|
|||
public static final String ETC_PAGE_SYNC_SETTINGS = "etc/page-sync-settings.txt";
|
||||
public static final String ETC_JOLOKIA_ACCESS_XML = "jolokia-access.xml";
|
||||
|
||||
@Option(name = "--host", description = "The host name of the broker (Default: 0.0.0.0 or input if clustered)")
|
||||
@Option(name = "--host", description = "Broker's host name. Default: 0.0.0.0 or input if clustered).")
|
||||
private String host;
|
||||
|
||||
@Option(name = "--http-host", description = "The host name to use for embedded web server (Default: localhost)")
|
||||
@Option(name = "--http-host", description = "Embedded web server's host name. Default: localhost.")
|
||||
private String httpHost = HTTP_HOST;
|
||||
|
||||
@Option(name = "--relax-jolokia", description = "disable strict checking on jolokia-access.xml")
|
||||
@Option(name = "--relax-jolokia", description = "Disable strict checking in jolokia-access.xml.")
|
||||
private boolean relaxJolokia;
|
||||
|
||||
@Option(name = "--ping", description = "A comma separated string to be passed on to the broker config as network-check-list. The broker will shutdown when all these addresses are unreachable.")
|
||||
private String ping;
|
||||
|
||||
@Option(name = "--default-port", description = "The port number to use for the main 'artemis' acceptor (Default: 61616)")
|
||||
@Option(name = "--default-port", description = "The port number to use for the main 'artemis' acceptor. Default: 61616.")
|
||||
private int defaultPort = DEFAULT_PORT;
|
||||
|
||||
@Option(name = "--http-port", description = "The port number to use for embedded web server (Default: 8161)")
|
||||
@Option(name = "--http-port", description = "Embedded web server's port. Default: 8161.")
|
||||
private int httpPort = HTTP_PORT;
|
||||
|
||||
@Option(name = "--ssl-key", description = "The key store path for embedded web server")
|
||||
@Option(name = "--ssl-key", description = "Embedded web server's key store path.")
|
||||
private String sslKey;
|
||||
|
||||
@Option(name = "--ssl-key-password", description = "The key store password")
|
||||
@Option(name = "--ssl-key-password", description = "The key store's password.")
|
||||
private String sslKeyPassword;
|
||||
|
||||
@Option(name = "--use-client-auth", description = "If the embedded server requires client authentication")
|
||||
@Option(name = "--use-client-auth", description = "Require client certificate authentication when connecting to the embedded web server.")
|
||||
private boolean useClientAuth;
|
||||
|
||||
@Option(name = "--ssl-trust", description = "The trust store path in case of client authentication")
|
||||
@Option(name = "--ssl-trust", description = "The trust store path in case of client authentication.")
|
||||
private String sslTrust;
|
||||
|
||||
@Option(name = "--ssl-trust-password", description = "The trust store password")
|
||||
@Option(name = "--ssl-trust-password", description = "The trust store's password.")
|
||||
private String sslTrustPassword;
|
||||
|
||||
@Option(name = "--name", description = "The name of the broker (Default: same as host)")
|
||||
@Option(name = "--name", description = "The name of the broker. Default: same as host name.")
|
||||
private String name;
|
||||
|
||||
@Option(name = "--port-offset", description = "Off sets the ports of every acceptor")
|
||||
@Option(name = "--port-offset", description = "How much to off-set the ports of every acceptor.")
|
||||
private int portOffset;
|
||||
|
||||
@Option(name = "--force", description = "Overwrite configuration at destination directory")
|
||||
@Option(name = "--force", description = "Overwrite configuration at destination directory.")
|
||||
private boolean force;
|
||||
|
||||
@Option(name = "--data", description = "Directory where ActiveMQ data are stored. Paths can be absolute or relative to artemis.instance directory ('data' by default)")
|
||||
@Option(name = "--data", description = "Directory where ActiveMQ data are stored. Paths can be absolute or relative to artemis.instance directory. Default: data.")
|
||||
private String data = "data";
|
||||
|
||||
@Option(name = "--clustered", description = "Enable clustering")
|
||||
@Option(name = "--clustered", description = "Enable clustering.")
|
||||
private boolean clustered = false;
|
||||
|
||||
@Option(name = "--max-hops", description = "Number of hops on the cluster configuration")
|
||||
@Option(name = "--max-hops", description = "Number of hops on the cluster configuration.")
|
||||
private int maxHops = 0;
|
||||
|
||||
@Option(name = "--message-load-balancing", description = "Load balancing policy on cluster. [ON_DEMAND (default) | STRICT | OFF | OFF_WITH_REDISTRIBUTION]")
|
||||
@Option(name = "--message-load-balancing", description = "Message load balancing policy for cluster. Default: ON_DEMAND. Valid values: ON_DEMAND, STRICT, OFF, OFF_WITH_REDISTRIBUTION.")
|
||||
private MessageLoadBalancingType messageLoadBalancing = MessageLoadBalancingType.ON_DEMAND;
|
||||
|
||||
@Option(name = "--replicated", description = "Enable broker replication")
|
||||
@Option(name = "--replicated", description = "Enable broker replication.")
|
||||
private boolean replicated = false;
|
||||
|
||||
@Option(name = "--shared-store", description = "Enable broker shared store")
|
||||
@Option(name = "--shared-store", description = "Enable broker shared store.")
|
||||
private boolean sharedStore = false;
|
||||
|
||||
@Option(name = "--slave", description = "Valid for shared store or replication: this is a slave server?")
|
||||
@Option(name = "--slave", description = "Be a slave broker. Valid for shared store or replication.")
|
||||
private boolean slave;
|
||||
|
||||
@Option(name = "--failover-on-shutdown", description = "Valid for shared store: will shutdown trigger a failover? (Default: false)")
|
||||
@Option(name = "--failover-on-shutdown", description = "Whether broker shutdown will trigger failover for clients using the core protocol. Valid only for shared store. Default: false.")
|
||||
private boolean failoverOnShutodwn;
|
||||
|
||||
@Option(name = "--cluster-user", description = "The cluster user to use for clustering. (Default: input)")
|
||||
@Option(name = "--cluster-user", description = "The user to use for clustering. Default: input.")
|
||||
private String clusterUser = null;
|
||||
|
||||
@Option(name = "--cluster-password", description = "The cluster password to use for clustering. (Default: input)")
|
||||
@Option(name = "--cluster-password", description = "The password to use for clustering. Default: input.")
|
||||
private String clusterPassword = null;
|
||||
|
||||
@Option(name = "--allow-anonymous", description = "Enables anonymous configuration on security, opposite of --require-login (Default: input)")
|
||||
@Option(name = "--allow-anonymous", description = "Allow connections from users with no security credentials. Opposite of --require-login. Default: input.")
|
||||
private Boolean allowAnonymous = null;
|
||||
|
||||
@Option(name = "--require-login", description = "This will configure security to require user / password, opposite of --allow-anonymous")
|
||||
@Option(name = "--require-login", description = "Require security credentials from users for connection. Opposite of --allow-anonymous.")
|
||||
private Boolean requireLogin = null;
|
||||
|
||||
@Option(name = "--paging", description = "Page messages to disk when address becomes full, opposite of --blocking (Default: true)")
|
||||
@Option(name = "--paging", description = "Page messages to disk when address becomes full. Opposite of --blocking. Default: true.")
|
||||
private Boolean paging;
|
||||
|
||||
@Option(name = "--blocking", description = "Block producers when address becomes full, opposite of --paging (Default: false)")
|
||||
@Option(name = "--blocking", description = "Block producers when address becomes full. Opposite of --paging. Default: false.")
|
||||
private Boolean blocking;
|
||||
|
||||
@Option(name = "--no-autotune", description = "Disable auto tuning on the journal.")
|
||||
@Option(name = "--no-autotune", description = "Disable auto tuning of the journal-buffer-timeout in broker.xml.")
|
||||
private boolean noAutoTune;
|
||||
|
||||
@Option(name = "--no-autocreate", description = "Disable Auto create addresses.")
|
||||
@Option(name = "--no-autocreate", description = "Disable auto creation for addresses & queues.")
|
||||
private Boolean noAutoCreate;
|
||||
|
||||
@Option(name = "--autocreate", description = "Auto create addresses. (default: true)")
|
||||
@Option(name = "--autocreate", description = "Allow automatic creation of addresses & queues. Default: true.")
|
||||
private Boolean autoCreate;
|
||||
|
||||
@Option(name = "--autodelete", description = "If set, the default broker.xml will allow auto deletion of queues and addresses")
|
||||
@Option(name = "--autodelete", description = "Allow automatic deletion of addresses & queues. Default: false.")
|
||||
private boolean autoDelete;
|
||||
|
||||
@Option(name = "--user", description = "The username (Default: input)")
|
||||
@Option(name = "--user", description = "The username. Default: input.")
|
||||
private String user;
|
||||
|
||||
@Option(name = "--password", description = "The user's password (Default: input)")
|
||||
@Option(name = "--password", description = "The user's password. Default: input.")
|
||||
private String password;
|
||||
|
||||
@Option(name = "--role", description = "The name for the role created (Default: amq)")
|
||||
@Option(name = "--role", description = "The name for the role created. Default: amq.")
|
||||
private String role = "amq";
|
||||
|
||||
@Option(name = "--no-web", description = "Remove the web-server definition from bootstrap.xml")
|
||||
@Option(name = "--no-web", description = "Whether to omit the web-server definition from bootstrap.xml.")
|
||||
private boolean noWeb;
|
||||
|
||||
@Option(name = "--queues", description = "Comma separated list of queues with the option to specify a routing type. (ex: --queues myqueue,mytopic:multicast)")
|
||||
@Option(name = "--queues", description = "A comma separated list of queues with the option to specify a routing type, e.g. --queues myqueue,mytopic:multicast.")
|
||||
private String queues;
|
||||
|
||||
@Option(name = "--addresses", description = "Comma separated list of addresses ")
|
||||
@Option(name = "--addresses", description = "A comma separated list of addresses.")
|
||||
private String addresses;
|
||||
|
||||
@Option(name = "--aio", description = "Sets the journal as asyncio.")
|
||||
@Option(name = "--aio", description = "Set the journal as asyncio.")
|
||||
private boolean aio;
|
||||
|
||||
@Option(name = "--nio", description = "Sets the journal as nio.")
|
||||
@Option(name = "--nio", description = "Set the journal as nio.")
|
||||
private boolean nio;
|
||||
|
||||
@Option(name = "--mapped", description = "Sets the journal as mapped.")
|
||||
@Option(name = "--mapped", description = "Set the journal as mapped.")
|
||||
private boolean mapped;
|
||||
|
||||
// this is used by the setupJournalType method
|
||||
|
@ -251,34 +251,34 @@ public class Create extends InstallAbstract {
|
|||
@Option(name = "--no-hornetq-acceptor", description = "Disable the HornetQ specific acceptor.")
|
||||
private boolean noHornetQAcceptor;
|
||||
|
||||
@Option(name = "--no-fsync", description = "Disable usage of fdatasync (channel.force(false) from java nio) on the journal")
|
||||
@Option(name = "--no-fsync", description = "Disable usage of fdatasync (channel.force(false) from Java NIO) on the journal.")
|
||||
private boolean noJournalSync;
|
||||
|
||||
@Option(name = "--journal-device-block-size", description = "The block size by the device, default at 4096.")
|
||||
@Option(name = "--journal-device-block-size", description = "The block size of the journal's storage device. Default: 4096.")
|
||||
private int journalDeviceBlockSize = 4096;
|
||||
|
||||
@Option(name = "--journal-retention", description = "If > 0, It will enable journal-retention-directory on the broker.xml allowing replay options. This option will configure retention in days.")
|
||||
@Option(name = "--journal-retention", description = "Configure journal retention in days. If > 0 then enable journal-retention-directory from broker.xml allowing replay options.")
|
||||
private int retentionDays;
|
||||
|
||||
@Option(name = "--journal-retention-max-bytes", description = "It will be passed as storage-limit on the journal-retention-directory tag")
|
||||
@Option(name = "--journal-retention-max-bytes", description = "Maximum number of bytes to keep in the retention directory.")
|
||||
private String retentionMaxBytes;
|
||||
|
||||
@Option(name = "--global-max-size", description = "Maximum amount of memory which message data may consume (Default: Undefined, half of the system's memory)")
|
||||
@Option(name = "--global-max-size", description = "Maximum amount of memory which message data may consume. Default: half of the JVM's max 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)")
|
||||
@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")
|
||||
@Option(name = "--jdbc", description = "Store message data in JDBC instead of local files.")
|
||||
boolean jdbc;
|
||||
|
||||
@Option(name = "--staticCluster", description = "Cluster node connectors list, separated by comma: Example \"tcp://server:61616,tcp://server2:61616,tcp://server3:61616\"")
|
||||
@Option(name = "--staticCluster", description = "Cluster node connectors list separated by comma, e.g. \"tcp://server:61616,tcp://server2:61616,tcp://server3:61616\".")
|
||||
String staticNode;
|
||||
|
||||
@Option(name = "--support-advisory", description = "If set, the generated configuration will allow advisories for the openwire protocol")
|
||||
@Option(name = "--support-advisory", description = "Support advisory messages for the OpenWire protocol.")
|
||||
boolean supportAdvisory = false;
|
||||
|
||||
@Option(name = "--suppress-internal-management-objects", description = "If set, the generated configuration will register any advisory addresses/queues to management services for the openwire protocol")
|
||||
@Option(name = "--suppress-internal-management-objects", description = "Do not register any advisory addresses/queues for the OpenWire protocol with the broker's management service.")
|
||||
boolean suppressInternalManagementObjects = false;
|
||||
|
||||
public String[] getStaticNodes() {
|
||||
|
@ -289,37 +289,37 @@ public class Create extends InstallAbstract {
|
|||
}
|
||||
}
|
||||
|
||||
@Option(name = "--security-manager", description = "Which security manager to use - jaas or basic (Default: jaas)")
|
||||
@Option(name = "--security-manager", description = "Which security manager to use - jaas or basic. Default: jaas.")
|
||||
private String securityManager = "jaas";
|
||||
|
||||
@Option(name = "--jdbc-bindings-table-name", description = "Name of the jdbc bindigns table")
|
||||
@Option(name = "--jdbc-bindings-table-name", description = "Name of the jdbc bindings table.")
|
||||
private String jdbcBindings = ActiveMQDefaultConfiguration.getDefaultBindingsTableName();
|
||||
|
||||
@Option(name = "--jdbc-message-table-name", description = "Name of the jdbc messages table")
|
||||
@Option(name = "--jdbc-message-table-name", description = "Name of the jdbc messages table.")
|
||||
private String jdbcMessages = ActiveMQDefaultConfiguration.getDefaultMessageTableName();
|
||||
|
||||
@Option(name = "--jdbc-large-message-table-name", description = "Name of the large messages table")
|
||||
@Option(name = "--jdbc-large-message-table-name", description = "Name of the large messages table.")
|
||||
private String jdbcLargeMessages = ActiveMQDefaultConfiguration.getDefaultLargeMessagesTableName();
|
||||
|
||||
@Option(name = "--jdbc-page-store-table-name", description = "Name of the page store messages table")
|
||||
@Option(name = "--jdbc-page-store-table-name", description = "Name of the page store messages table.")
|
||||
private String jdbcPageStore = ActiveMQDefaultConfiguration.getDefaultPageStoreTableName();
|
||||
|
||||
@Option(name = "--jdbc-node-manager-table-name", description = "Name of the jdbc node manager table")
|
||||
@Option(name = "--jdbc-node-manager-table-name", description = "Name of the jdbc node manager table.")
|
||||
private String jdbcNodeManager = ActiveMQDefaultConfiguration.getDefaultNodeManagerStoreTableName();
|
||||
|
||||
@Option(name = "--jdbc-connection-url", description = "The connection used for the database")
|
||||
@Option(name = "--jdbc-connection-url", description = "The URL used for the database connection.")
|
||||
private String jdbcURL = null;
|
||||
|
||||
@Option(name = "--jdbc-driver-class-name", description = "JDBC driver classname")
|
||||
@Option(name = "--jdbc-driver-class-name", description = "JDBC driver classname.")
|
||||
private String jdbcClassName = ActiveMQDefaultConfiguration.getDefaultDriverClassName();
|
||||
|
||||
@Option(name = "--jdbc-network-timeout", description = "Network timeout")
|
||||
@Option(name = "--jdbc-network-timeout", description = "Network timeout (in milliseconds).")
|
||||
long jdbcNetworkTimeout = ActiveMQDefaultConfiguration.getDefaultJdbcNetworkTimeout();
|
||||
|
||||
@Option(name = "--jdbc-lock-renew-period", description = "Lock Renew Period")
|
||||
@Option(name = "--jdbc-lock-renew-period", description = "Lock Renew Period (in milliseconds).")
|
||||
long jdbcLockRenewPeriod = ActiveMQDefaultConfiguration.getDefaultJdbcLockRenewPeriodMillis();
|
||||
|
||||
@Option(name = "--jdbc-lock-expiration", description = "Lock expiration")
|
||||
@Option(name = "--jdbc-lock-expiration", description = "Lock expiration (in milliseconds).")
|
||||
long jdbcLockExpiration = ActiveMQDefaultConfiguration.getDefaultJdbcLockExpirationMillis();
|
||||
|
||||
private boolean isAutoCreate() {
|
||||
|
@ -345,7 +345,7 @@ public class Create extends InstallAbstract {
|
|||
|
||||
private String getHostForClustered() {
|
||||
if (getHost().equals("0.0.0.0")) {
|
||||
host = input("--host", "Host " + host + " is not valid for clustering, please provide a valid IP or hostname", "localhost");
|
||||
host = input("--host", "Host " + host + " is not valid for clustering. Please provide a valid IP or hostname", "localhost");
|
||||
}
|
||||
|
||||
return host;
|
||||
|
@ -406,35 +406,35 @@ public class Create extends InstallAbstract {
|
|||
|
||||
private String getClusterUser() {
|
||||
if (clusterUser == null) {
|
||||
clusterUser = input("--cluster-user", "Please provide the username:", "cluster-admin");
|
||||
clusterUser = input("--cluster-user", "What is the cluster user?", "cluster-admin");
|
||||
}
|
||||
return clusterUser;
|
||||
}
|
||||
|
||||
private String getClusterPassword() {
|
||||
if (clusterPassword == null) {
|
||||
clusterPassword = inputPassword("--cluster-password", "Please enter the password:", "password-admin");
|
||||
clusterPassword = inputPassword("--cluster-password", "What is the cluster password?", "password-admin");
|
||||
}
|
||||
return clusterPassword;
|
||||
}
|
||||
|
||||
private String getSslKeyPassword() {
|
||||
if (sslKeyPassword == null) {
|
||||
sslKeyPassword = inputPassword("--ssl-key-password", "Please enter the keystore password:", "password");
|
||||
sslKeyPassword = inputPassword("--ssl-key-password", "What is the keystore password?", "password");
|
||||
}
|
||||
return sslKeyPassword;
|
||||
}
|
||||
|
||||
private String getSslTrust() {
|
||||
if (sslTrust == null) {
|
||||
sslTrust = input("--ssl-trust", "Please enter the trust store path:", "/etc/truststore.jks");
|
||||
sslTrust = input("--ssl-trust", "What is the trust store path?", "/etc/truststore.jks");
|
||||
}
|
||||
return sslTrust;
|
||||
}
|
||||
|
||||
private String getSslTrustPassword() {
|
||||
if (sslTrustPassword == null) {
|
||||
sslTrustPassword = inputPassword("--ssl-key-password", "Please enter the keystore password:", "password");
|
||||
sslTrustPassword = inputPassword("--ssl-key-password", "What is the keystore password?", "password");
|
||||
}
|
||||
return sslTrustPassword;
|
||||
}
|
||||
|
@ -453,7 +453,7 @@ public class Create extends InstallAbstract {
|
|||
public String getPassword() {
|
||||
|
||||
if (password == null) {
|
||||
password = inputPassword("--password", "Please provide the default password:", "admin");
|
||||
password = inputPassword("--password", "What is the default password?", "admin");
|
||||
}
|
||||
|
||||
password = HashUtil.tryHash(getActionContext(), password);
|
||||
|
@ -467,7 +467,7 @@ public class Create extends InstallAbstract {
|
|||
|
||||
public String getUser() {
|
||||
if (user == null) {
|
||||
user = input("--user", "Please provide the default username:", "admin");
|
||||
user = input("--user", "What is the default username?", "admin");
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ public class Create extends InstallAbstract {
|
|||
if (journalDeviceBlockSize % 512 != 0) {
|
||||
// This will generate a CLI error
|
||||
// no need to a logger here as this would be just a regular UI output
|
||||
throw new IllegalArgumentException("You must pass a device-block-size multiple of 512");
|
||||
throw new IllegalArgumentException("The device-block-size must be a multiple of 512");
|
||||
}
|
||||
|
||||
filters.put("${device-block-size}", Integer.toString(journalDeviceBlockSize));
|
||||
|
|
|
@ -34,7 +34,7 @@ public class InputAbstract extends ActionAbstract {
|
|||
inputEnabled = true;
|
||||
}
|
||||
|
||||
@Option(name = "--silent", description = "It will disable all the inputs, and it would make a best guess for any required input")
|
||||
@Option(name = "--silent", description = "Disable all the inputs, and make a best guess for any required input.")
|
||||
private boolean silentInput = false;
|
||||
|
||||
public boolean isSilentInput() {
|
||||
|
@ -52,7 +52,7 @@ public class InputAbstract extends ActionAbstract {
|
|||
|
||||
Boolean booleanValue = null;
|
||||
do {
|
||||
String value = input(propertyName, prompt + ", valid values are Y,N,True,False", Boolean.toString(silentDefault));
|
||||
String value = input(propertyName, prompt + ", valid values are Y, N, True, False", Boolean.toString(silentDefault));
|
||||
|
||||
switch (value.toUpperCase().trim()) {
|
||||
case "TRUE":
|
||||
|
|
|
@ -39,25 +39,25 @@ public class InstallAbstract extends InputAbstract {
|
|||
@Arguments(description = "The instance directory to hold the broker's configuration and data. Path must be writable.", required = true)
|
||||
protected File directory;
|
||||
|
||||
@Option(name = "--etc", description = "Directory where ActiveMQ configuration is located. Paths can be absolute or relative to artemis.instance directory ('etc' by default)")
|
||||
@Option(name = "--etc", description = "Directory where ActiveMQ configuration is located. Paths can be absolute or relative to artemis.instance directory. Default: etc.")
|
||||
protected String etc = "etc";
|
||||
|
||||
@Option(name = "--home", description = "Directory where ActiveMQ Artemis is installed")
|
||||
@Option(name = "--home", description = "Directory where ActiveMQ Artemis is installed.")
|
||||
protected File home;
|
||||
|
||||
@Option(name = "--encoding", description = "The encoding that text files should use. Default = UTF-8.")
|
||||
@Option(name = "--encoding", description = "The encoding that text files should use. Default: UTF-8.")
|
||||
protected String encoding = "UTF-8";
|
||||
|
||||
@Option(name = "--windows", description = "Force windows script creation. Default based on your actual system.")
|
||||
@Option(name = "--windows", description = "Force Windows script creation. Default: based on your actual system.")
|
||||
protected boolean windows = false;
|
||||
|
||||
@Option(name = "--cygwin", description = "Force cygwin script creation. Default based on your actual system.")
|
||||
@Option(name = "--cygwin", description = "Force Cygwin script creation. Default: based on your actual system.")
|
||||
protected boolean cygwin = false;
|
||||
|
||||
@Option(name = "--java-options", description = "Extra java options to be passed to the profile")
|
||||
@Option(name = "--java-options", description = "Extra Java options to be passed to the profile.")
|
||||
protected String javaOptions = "";
|
||||
|
||||
@Option(name = "--java-memory", description = "Define the -Xmx memory parameter for the broker. Default = '2G'")
|
||||
@Option(name = "--java-memory", description = "Define the -Xmx memory parameter for the broker. Default: 2G.")
|
||||
protected String javaMemory = "2G";
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import java.io.File;
|
|||
import io.airlift.airline.Command;
|
||||
import org.apache.activemq.artemis.dto.BrokerDTO;
|
||||
|
||||
@Command(name = "kill", description = "Kills a broker instance started with --allow-kill")
|
||||
@Command(name = "kill", description = "Kill a broker started with --allow-kill.")
|
||||
public class Kill extends Configurable {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,19 +27,19 @@ import org.apache.activemq.artemis.utils.DefaultSensitiveStringCodec;
|
|||
import org.apache.activemq.artemis.utils.PasswordMaskingUtil;
|
||||
import org.apache.activemq.artemis.utils.SensitiveDataCodec;
|
||||
|
||||
@Command(name = "mask", description = "mask a password and print it out")
|
||||
@Command(name = "mask", description = "Mask a password and print it out.")
|
||||
public class Mask extends ActionAbstract {
|
||||
|
||||
@Arguments(description = "The password to be masked", required = true)
|
||||
@Arguments(description = "The password to be masked.", required = true)
|
||||
String password;
|
||||
|
||||
@Option(name = "--hash", description = "whether to use hash (one-way), default false")
|
||||
@Option(name = "--hash", description = "Whether to use a hash (one-way). Default: false.")
|
||||
boolean hash = false;
|
||||
|
||||
@Option(name = "--key", description = "the key (Blowfish) to mask a password")
|
||||
@Option(name = "--key", description = "The key (Blowfish) to mask a password.")
|
||||
String key;
|
||||
|
||||
@Option(name = "--password-codec", description = "whether to use password codec defined in the configuration, default false")
|
||||
@Option(name = "--password-codec", description = "Whether to use the password codec defined in the configuration. Default: false")
|
||||
boolean passwordCodec = false;
|
||||
|
||||
private SensitiveDataCodec<String> codec;
|
||||
|
|
|
@ -20,7 +20,7 @@ import io.airlift.airline.Command;
|
|||
import org.apache.activemq.artemis.core.version.Version;
|
||||
import org.apache.activemq.artemis.utils.VersionLoader;
|
||||
|
||||
@Command(name = "version", description = "print version information")
|
||||
@Command(name = "version", description = "Print version information.")
|
||||
public class PrintVersion extends ActionAbstract {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -42,13 +42,13 @@ import org.apache.activemq.artemis.integration.bootstrap.ActiveMQBootstrapLogger
|
|||
import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
|
||||
import org.apache.activemq.artemis.utils.ReusableLatch;
|
||||
|
||||
@Command(name = "run", description = "runs the broker instance")
|
||||
@Command(name = "run", description = "Run the broker.")
|
||||
public class Run extends LockAbstract {
|
||||
|
||||
@Option(name = "--allow-kill", description = "This will allow the server to kill itself. Useful for tests (failover tests for instance)")
|
||||
@Option(name = "--allow-kill", description = "This will allow the server to kill itself. Useful for tests (e.g. failover tests).")
|
||||
boolean allowKill;
|
||||
|
||||
@Option(name = "--properties", description = "A file url to a properties file that is applied to the server's internal ConfigurationImpl bean")
|
||||
@Option(name = "--properties", description = "URL to a properties file that is applied to the server's configuration.")
|
||||
String properties;
|
||||
|
||||
private static boolean embedded = false;
|
||||
|
|
|
@ -21,7 +21,7 @@ import java.io.File;
|
|||
import io.airlift.airline.Command;
|
||||
import org.apache.activemq.artemis.dto.BrokerDTO;
|
||||
|
||||
@Command(name = "stop", description = "stops the broker instance")
|
||||
@Command(name = "stop", description = "Stop the broker.")
|
||||
public class Stop extends Configurable {
|
||||
|
||||
public static final String STOP_FILE_NAME = "STOP_ME";
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.stream.Stream;
|
|||
import io.airlift.airline.Command;
|
||||
import org.apache.activemq.artemis.util.JVMArgumentParser;
|
||||
|
||||
@Command(name = "upgrade", description = "Update an artemis instance to the current artemis.home, keeping all the data and broker.xml. Warning: backup your instance before using this command and compare the files.")
|
||||
@Command(name = "upgrade", description = "Update a broker instance to the current artemis.home, keeping all the data and broker.xml. Warning: backup your instance before using this command and compare the files.")
|
||||
public class Upgrade extends InstallAbstract {
|
||||
|
||||
// these are the JVM argumnents we must keep between upgrades
|
||||
|
|
|
@ -37,15 +37,15 @@ import org.apache.activemq.artemis.quorum.MutableLong;
|
|||
|
||||
import static org.apache.activemq.artemis.cli.commands.activation.ActivationSequenceUtils.applyCoordinationId;
|
||||
|
||||
@Command(name = "list", description = "list local and/or coordinated activation sequences")
|
||||
@Command(name = "list", description = "List local and/or remote (i.e. coordinated) activation sequences.")
|
||||
public class ActivationSequenceList extends LockAbstract {
|
||||
|
||||
private static final int MANAGER_START_TIMEOUT_SECONDS = 60;
|
||||
@Option(name = "--node-id", description = "This can be used just with --remote option. If not set, broker NodeID is used instead")
|
||||
@Option(name = "--node-id", description = "This can be used just with --remote option. If not set, broker NodeID is used instead.")
|
||||
public String nodeId = null;
|
||||
@Option(name = "--remote", description = "List just coordinated activation sequence")
|
||||
@Option(name = "--remote", description = "List just remote (i.e. coordinated) activation sequence.")
|
||||
public boolean remote = false;
|
||||
@Option(name = "--local", description = "List just local activation sequence")
|
||||
@Option(name = "--local", description = "List just local activation sequence.")
|
||||
public boolean local = false;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,17 +37,17 @@ import org.apache.activemq.artemis.quorum.MutableLong;
|
|||
|
||||
import static org.apache.activemq.artemis.cli.commands.activation.ActivationSequenceUtils.applyCoordinationId;
|
||||
|
||||
@Command(name = "set", description = "Set local and/or remote activation sequence")
|
||||
@Command(name = "set", description = "Set local and/or remote (i.e. coordinated) activation sequence.")
|
||||
public class ActivationSequenceSet extends LockAbstract {
|
||||
|
||||
private static final int MANAGER_START_TIMEOUT_SECONDS = 60;
|
||||
@Option(name = "--node-id", description = "Target sequence for this UUID overwriting the NodeID of this broker too. If not set, broker NodeID is used instead.")
|
||||
public String nodeId = null;
|
||||
@Option(name = "--remote", description = "Set just coordinated activation sequence")
|
||||
@Option(name = "--remote", description = "Set just remote (i.e. coordinated) activation sequence.")
|
||||
public boolean remote = false;
|
||||
@Option(name = "--local", description = "Set just local activation sequence")
|
||||
@Option(name = "--local", description = "Set just local activation sequence.")
|
||||
public boolean local = false;
|
||||
@Option(name = "--to", description = "new activation sequence.", required = true)
|
||||
@Option(name = "--to", description = "The new activation sequence.", required = true)
|
||||
public long value;
|
||||
|
||||
@Override
|
||||
|
@ -68,7 +68,7 @@ public class ActivationSequenceSet extends LockAbstract {
|
|||
final boolean local = command.local;
|
||||
final long value = command.value;
|
||||
if (remote && local) {
|
||||
throw new IllegalArgumentException("--local and --remote cannot be both present: to set both sequences just drop both options");
|
||||
throw new IllegalArgumentException("Both --local and --remote cannot be present. To set both sequences just remove --local and --remote.");
|
||||
}
|
||||
if (value < 0) {
|
||||
throw new IllegalArgumentException("--to must be >= 0");
|
||||
|
@ -84,7 +84,7 @@ public class ActivationSequenceSet extends LockAbstract {
|
|||
managerConfiguration = primaryPolicyConfig.getDistributedManagerConfiguration();
|
||||
if (primaryPolicyConfig.getCoordinationId() != null) {
|
||||
if (nodeId != null) {
|
||||
throw new IllegalArgumentException("forcing NodeID with multi-primary is not supported! Try again without --node-id");
|
||||
throw new IllegalArgumentException("Forcing NodeID with multi-primary is not supported! Try again without --node-id");
|
||||
}
|
||||
coordinationId = primaryPolicyConfig.getCoordinationId();
|
||||
}
|
||||
|
|
|
@ -21,19 +21,19 @@ import org.apache.activemq.artemis.cli.commands.AbstractAction;
|
|||
|
||||
public abstract class AddressAbstract extends AbstractAction {
|
||||
|
||||
@Option(name = "--name", description = "The name of this address")
|
||||
@Option(name = "--name", description = "The address's name.")
|
||||
private String name;
|
||||
|
||||
@Option(name = "--anycast", description = "It will determine this address as anycast")
|
||||
@Option(name = "--anycast", description = "Whether the address supports anycast queues.")
|
||||
private Boolean anycast;
|
||||
|
||||
@Option(name = "--no-anycast", description = "It will not determine this address as anycast")
|
||||
@Option(name = "--no-anycast", description = "Whether the address won't support anycast queues.")
|
||||
private Boolean noAnycast;
|
||||
|
||||
@Option(name = "--multicast", description = "It will determine this address as multicast")
|
||||
@Option(name = "--multicast", description = "Whether the address supports multicast queues.")
|
||||
private Boolean multicast;
|
||||
|
||||
@Option(name = "--no-multicast", description = "It will not determine this address as multicast")
|
||||
@Option(name = "--no-multicast", description = "Whether the address won't support multicast queues.")
|
||||
private Boolean noMulticast;
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ public abstract class AddressAbstract extends AbstractAction {
|
|||
|
||||
public String getName(boolean requireInput) {
|
||||
if (name == null && requireInput) {
|
||||
name = input("--name", "Provide the name of the address", null);
|
||||
name = input("--name", "What is the name of the address?", null);
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public abstract class AddressAbstract extends AbstractAction {
|
|||
anycast = !noAnycast.booleanValue();
|
||||
}
|
||||
if (anycast == null) {
|
||||
anycast = inputBoolean("--anycast", "Will this address support anycast queues", false);
|
||||
anycast = inputBoolean("--anycast", "Will this address support anycast queues?", false);
|
||||
}
|
||||
return anycast;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public abstract class AddressAbstract extends AbstractAction {
|
|||
multicast = !noMulticast.booleanValue();
|
||||
}
|
||||
if (multicast == null) {
|
||||
multicast = inputBoolean("--multicast", "Will this address support multicast queues", true);
|
||||
multicast = inputBoolean("--multicast", "Will this address support multicast queues?", true);
|
||||
}
|
||||
return multicast;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.apache.activemq.artemis.api.core.client.ClientMessage;
|
|||
import org.apache.activemq.artemis.api.core.management.ManagementHelper;
|
||||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
|
||||
@Command(name = "create", description = "create an address")
|
||||
@Command(name = "create", description = "Create an address.")
|
||||
public class CreateAddress extends AddressAbstract {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,10 +23,10 @@ import org.apache.activemq.artemis.api.core.client.ClientMessage;
|
|||
import org.apache.activemq.artemis.api.core.management.ManagementHelper;
|
||||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
|
||||
@Command(name = "delete", description = "delete an address")
|
||||
@Command(name = "delete", description = "Delete an address.")
|
||||
public class DeleteAddress extends AddressAbstract {
|
||||
|
||||
@Option(name = "--force", description = "delete the address even if it has queues - all messages in those queues will be deleted! (default false)")
|
||||
@Option(name = "--force", description = "Delete the address even if it has queues. All messages in those queues will be deleted! Default: false.")
|
||||
private Boolean force = false;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,11 +23,11 @@ import org.apache.activemq.artemis.api.core.client.ClientMessage;
|
|||
import org.apache.activemq.artemis.api.core.management.ManagementHelper;
|
||||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
|
||||
@Command(name = "show", description = "Get the selected address")
|
||||
@Command(name = "show", description = "Show the selected address.")
|
||||
public class ShowAddress extends AddressAbstract {
|
||||
|
||||
|
||||
@Option(name = "--bindings", description = "Shows the bindings for this address")
|
||||
@Option(name = "--bindings", description = "Show the bindings for this address.")
|
||||
boolean bindings;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.apache.activemq.artemis.api.core.management.ManagementHelper;
|
|||
import org.apache.activemq.artemis.cli.commands.AbstractAction;
|
||||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
|
||||
@Command(name = "update", description = "update an address")
|
||||
@Command(name = "update", description = "Update an address.")
|
||||
public class UpdateAddress extends AddressAbstract {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,13 +33,13 @@ import org.apache.commons.lang3.time.StopWatch;
|
|||
|
||||
public abstract class CheckAbstract extends AbstractAction {
|
||||
|
||||
@Option(name = "--name", description = "Name of the target to check")
|
||||
@Option(name = "--name", description = "Name of the target to check.")
|
||||
protected String name;
|
||||
|
||||
@Option(name = "--timeout", description = "Time to wait for the check execution, in milliseconds")
|
||||
@Option(name = "--timeout", description = "Time to wait for the check to complete (in milliseconds).")
|
||||
private int timeout = 30000;
|
||||
|
||||
@Option(name = "--fail-at-end", description = "If a particular module check fails, continue the rest of the checks")
|
||||
@Option(name = "--fail-at-end", description = "Continue with the rest of the checks even if a particular module check fails.")
|
||||
private boolean failAtEnd = false;
|
||||
|
||||
public String getName() {
|
||||
|
|
|
@ -23,25 +23,25 @@ import io.airlift.airline.Command;
|
|||
import io.airlift.airline.Option;
|
||||
import org.apache.activemq.artemis.api.core.management.NodeInfo;
|
||||
|
||||
@Command(name = "node", description = "Check a node")
|
||||
@Command(name = "node", description = "Check a node.")
|
||||
public class NodeCheck extends CheckAbstract {
|
||||
|
||||
@Option(name = "--up", description = "Check that the node is started, it is executed by default if there are no other checks")
|
||||
@Option(name = "--up", description = "Check that the node is started. This check is executed by default if there are no other checks.")
|
||||
private boolean up;
|
||||
|
||||
@Option(name = "--diskUsage", description = "Disk usage percentage to check or -1 to use the max-disk-usage")
|
||||
@Option(name = "--diskUsage", description = "Disk usage percentage to check or -1 to use the max-disk-usage.")
|
||||
private Integer diskUsage;
|
||||
|
||||
@Option(name = "--memoryUsage", description = "Memory usage percentage to check")
|
||||
@Option(name = "--memoryUsage", description = "Memory usage percentage to check.")
|
||||
private Integer memoryUsage;
|
||||
|
||||
@Option(name = "--live", description = "Check that the node has a live")
|
||||
@Option(name = "--live", description = "Check that the node has a connected live.")
|
||||
private boolean live;
|
||||
|
||||
@Option(name = "--backup", description = "Check that the node has a backup")
|
||||
@Option(name = "--backup", description = "Check that the node has a connected backup.")
|
||||
private boolean backup;
|
||||
|
||||
@Option(name = "--peers", description = "Number of peers to check")
|
||||
@Option(name = "--peers", description = "Number of peers to check.")
|
||||
private Integer peers;
|
||||
|
||||
public boolean isUp() {
|
||||
|
|
|
@ -31,19 +31,19 @@ import io.airlift.airline.Command;
|
|||
import io.airlift.airline.Option;
|
||||
import org.apache.activemq.artemis.api.core.management.ResourceNames;
|
||||
|
||||
@Command(name = "queue", description = "Check a queue")
|
||||
@Command(name = "queue", description = "Check a queue.")
|
||||
public class QueueCheck extends CheckAbstract {
|
||||
|
||||
@Option(name = "--up", description = "Check that the queue exists and is not paused, it is executed by default if there are no other checks")
|
||||
@Option(name = "--up", description = "Check that the queue exists and is not paused. This check is executed by default if there are no other checks.")
|
||||
private boolean up;
|
||||
|
||||
@Option(name = "--browse", description = "Number of the messages to browse or -1 to check that the queue is browsable")
|
||||
@Option(name = "--browse", description = "Number of the messages to browse or -1 to check that the queue is browsable.")
|
||||
private Integer browse;
|
||||
|
||||
@Option(name = "--consume", description = "Number of the messages to consume or -1 to check that the queue is consumable")
|
||||
@Option(name = "--consume", description = "Number of the messages to consume or -1 to check that the queue is consumable.")
|
||||
private Integer consume;
|
||||
|
||||
@Option(name = "--produce", description = "Number of the messages to produce")
|
||||
@Option(name = "--produce", description = "Number of the messages to produce.")
|
||||
private Integer produce;
|
||||
|
||||
public boolean isUp() {
|
||||
|
|
|
@ -26,10 +26,10 @@ import io.airlift.airline.Command;
|
|||
import io.airlift.airline.Option;
|
||||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
|
||||
@Command(name = "browser", description = "It will browse messages on an instance")
|
||||
@Command(name = "browser", description = "Browse messages on a queue.")
|
||||
public class Browse extends DestAbstract {
|
||||
|
||||
@Option(name = "--filter", description = "filter to be used with the consumer")
|
||||
@Option(name = "--filter", description = "The message filter.")
|
||||
String filter;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,22 +29,22 @@ import org.apache.qpid.jms.JmsConnectionFactory;
|
|||
|
||||
public class ConnectionAbstract extends InputAbstract {
|
||||
|
||||
@Option(name = "--url", description = "URL towards the broker. (default: Build URL from acceptors defined in the broker.xml or tcp://localhost:61616 if the default cannot be parsed)")
|
||||
@Option(name = "--url", description = "Connection URL. Default: build URL from the 'artemis' acceptor defined in the broker.xml or tcp://localhost:61616 if the acceptor cannot be parsed.")
|
||||
protected String brokerURL = DEFAULT_BROKER_URL;
|
||||
|
||||
@Option(name = "--acceptor", description = "Acceptor used to build URL towards the broker")
|
||||
@Option(name = "--acceptor", description = "Acceptor used to build the connection URL.")
|
||||
protected String acceptor;
|
||||
|
||||
@Option(name = "--user", description = "User used to connect")
|
||||
@Option(name = "--user", description = "User used to connect.")
|
||||
protected String user;
|
||||
|
||||
@Option(name = "--password", description = "Password used to connect")
|
||||
@Option(name = "--password", description = "Password used to connect.")
|
||||
protected String password;
|
||||
|
||||
@Option(name = "--clientID", description = "ClientID to be associated with connection")
|
||||
@Option(name = "--clientID", description = "ClientID set on the connection.")
|
||||
protected String clientID;
|
||||
|
||||
@Option(name = "--protocol", description = "Protocol used. Valid values are amqp or core. Default=core.")
|
||||
@Option(name = "--protocol", description = "Protocol used. Valid values are amqp or core. Default: core.")
|
||||
protected String protocol = "core";
|
||||
|
||||
public String getBrokerURL() {
|
||||
|
@ -219,7 +219,7 @@ public class ConnectionAbstract extends InputAbstract {
|
|||
}
|
||||
|
||||
private String inputBrokerURL(String defaultValue) {
|
||||
return input("--url", "Type in the broker URL for a retry (e.g. tcp://localhost:61616)", defaultValue);
|
||||
return input("--url", "Type in the connection URL for a retry (e.g. tcp://localhost:61616)", defaultValue);
|
||||
}
|
||||
|
||||
private String inputUser(String user) {
|
||||
|
|
|
@ -31,22 +31,22 @@ import io.airlift.airline.Option;
|
|||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
import org.apache.activemq.artemis.cli.factory.serialize.MessageSerializer;
|
||||
|
||||
@Command(name = "consumer", description = "It will consume messages from an instance")
|
||||
@Command(name = "consumer", description = "Consume messages from a queue.")
|
||||
public class Consumer extends DestAbstract {
|
||||
|
||||
@Option(name = "--durable", description = "It will use durable subscription in case of client")
|
||||
@Option(name = "--durable", description = "Whether the consumer's subscription will be durable.")
|
||||
boolean durable = false;
|
||||
|
||||
@Option(name = "--break-on-null", description = "It will break on null messages")
|
||||
@Option(name = "--break-on-null", description = "Stop consuming when a null message is received.")
|
||||
boolean breakOnNull = false;
|
||||
|
||||
@Option(name = "--receive-timeout", description = "Time used on receive(timeout)")
|
||||
@Option(name = "--receive-timeout", description = "Timeout for receiving messages (in milliseconds).")
|
||||
int receiveTimeout = 3000;
|
||||
|
||||
@Option(name = "--filter", description = "filter to be used with the consumer")
|
||||
@Option(name = "--filter", description = "The message filter.")
|
||||
String filter;
|
||||
|
||||
@Option(name = "--data", description = "serialize the messages to the specified file as they are consumed")
|
||||
@Option(name = "--data", description = "Serialize the messages to the specified file as they are consumed.")
|
||||
String file;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,22 +28,22 @@ import org.apache.activemq.artemis.jms.client.ActiveMQDestination;
|
|||
|
||||
public class DestAbstract extends ConnectionAbstract {
|
||||
|
||||
@Option(name = "--destination", description = "Destination to be used. It can be prefixed with queue:// or topic:// and can be an FQQN in the form of <address>::<queue>. (Default: queue://TEST)")
|
||||
@Option(name = "--destination", description = "Destination to be used. It can be prefixed with queue:// or topic:// and can be an FQQN in the form of <address>::<queue>. Default: queue://TEST.")
|
||||
String destination = "queue://TEST";
|
||||
|
||||
@Option(name = "--message-count", description = "Number of messages to act on (Default: 1000)")
|
||||
@Option(name = "--message-count", description = "Number of messages to act on. Default: 1000.")
|
||||
int messageCount = 1000;
|
||||
|
||||
@Option(name = "--sleep", description = "Time wait between each message")
|
||||
@Option(name = "--sleep", description = "Time wait between each message.")
|
||||
int sleep = 0;
|
||||
|
||||
@Option(name = "--txt-size", description = "TX Batch Size")
|
||||
@Option(name = "--txt-size", description = "Transaction batch size.")
|
||||
int txBatchSize;
|
||||
|
||||
@Option(name = "--threads", description = "Number of Threads to be used (Default: 1)")
|
||||
@Option(name = "--threads", description = "Number of threads to use. Default: 1.")
|
||||
int threads = 1;
|
||||
|
||||
@Option(name = "--serializer", description = "Override the default serializer with a custom implementation")
|
||||
@Option(name = "--serializer", description = "The class name of the custom serializer implementation to use intead of the default.")
|
||||
String serializer;
|
||||
|
||||
protected MessageSerializer getMessageSerializer() {
|
||||
|
|
|
@ -32,33 +32,33 @@ import io.airlift.airline.Option;
|
|||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
import org.apache.activemq.artemis.cli.factory.serialize.MessageSerializer;
|
||||
|
||||
@Command(name = "producer", description = "It will send messages to an instance")
|
||||
@Command(name = "producer", description = "Send message(s) to a broker.")
|
||||
public class Producer extends DestAbstract {
|
||||
|
||||
public static final String DEMO_TEXT = "demo.txt";
|
||||
|
||||
@Option(name = "--non-persistent", description = "It will send messages non persistently")
|
||||
@Option(name = "--non-persistent", description = "Send messages non persistently.")
|
||||
boolean nonpersistent = false;
|
||||
|
||||
@Option(name = "--message-size", description = "Size of each byteMessage (The producer will use byte message on this case)")
|
||||
@Option(name = "--message-size", description = "Size of each bytesMessage. The producer will use JMS BytesMessage.")
|
||||
int messageSize = 0;
|
||||
|
||||
@Option(name = "--message", description = "Content of each textMessage (The producer will use text message on this case)")
|
||||
@Option(name = "--message", description = "Content of each textMessage. The producer will use JMS TextMessage.")
|
||||
String message = null;
|
||||
|
||||
@Option(name = "--text-size", description = "Size of each textMessage (The producer will use text message on this case)")
|
||||
@Option(name = "--text-size", description = "Size of each textMessage. The producer will use JMS TextMessage.")
|
||||
int textMessageSize;
|
||||
|
||||
@Option(name = "--object-size", description = "Size of each ObjectMessage (The producer will use object message on this case)")
|
||||
@Option(name = "--object-size", description = "Size of each ObjectMessage. The producer will use JMS ObjectMessage.")
|
||||
int objectSize;
|
||||
|
||||
@Option(name = "--msgttl", description = "TTL for each message")
|
||||
@Option(name = "--msgttl", description = "TTL for each message.")
|
||||
long msgTTL = 0L;
|
||||
|
||||
@Option(name = "--group", description = "Message Group to be used")
|
||||
@Option(name = "--group", description = "Message Group to be used.")
|
||||
String msgGroupID = null;
|
||||
|
||||
@Option(name = "--data", description = "Messages will be read form the specified file, other message options will be ignored.")
|
||||
@Option(name = "--data", description = "Messages will be read from the specified file. Other message options will be ignored.")
|
||||
String file = null;
|
||||
|
||||
public boolean isNonpersistent() {
|
||||
|
|
|
@ -36,73 +36,73 @@ import org.apache.activemq.artemis.cli.commands.InputAbstract;
|
|||
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
|
||||
import org.apache.qpid.jms.JmsConnectionFactory;
|
||||
|
||||
@Command(name = "transfer", description = "Moves Messages from one destination towards another destination")
|
||||
@Command(name = "transfer", description = "Move messages from one destination towards another destination.")
|
||||
public class Transfer extends InputAbstract {
|
||||
|
||||
@Option(name = "--source-url", description = "URL towards the broker. (default: Build URL from acceptors defined in the broker.xml or tcp://localhost:61616 if the default cannot be parsed)")
|
||||
@Option(name = "--source-url", description = "URL for the source broker. Default: build URL from 'artemis' acceptor defined in the broker.xml or tcp://localhost:61616 if the default cannot be parsed.")
|
||||
protected String sourceURL = DEFAULT_BROKER_URL;
|
||||
|
||||
@Option(name = "--source-acceptor", description = "Acceptor used to build URL towards the broker")
|
||||
@Option(name = "--source-acceptor", description = "Acceptor used to build URL towards the broker. Default: 'artemis'.")
|
||||
protected String sourceAcceptor;
|
||||
|
||||
@Option(name = "--source-user", description = "User used to connect")
|
||||
@Option(name = "--source-user", description = "User used to connect to source broker.")
|
||||
protected String sourceUser;
|
||||
|
||||
@Option(name = "--source-password", description = "Password used to connect")
|
||||
@Option(name = "--source-password", description = "Password used to connect to source broker.")
|
||||
protected String sourcePassword;
|
||||
|
||||
@Option(name = "--target-url", description = "URL towards the broker. (default: Read from current broker.xml or tcp://localhost:61616 if the default cannot be parsed)")
|
||||
@Option(name = "--target-url", description = "URL for the target broker. Default: build URL from 'artemis' acceptor defined in the broker.xml or tcp://localhost:61616 if the default cannot be parsed.")
|
||||
protected String targetURL = DEFAULT_BROKER_URL;
|
||||
|
||||
@Option(name = "--target-user", description = "User used to connect")
|
||||
@Option(name = "--target-user", description = "User used to connect to target broker.")
|
||||
protected String targetUser;
|
||||
|
||||
@Option(name = "--target-password", description = "Password used to connect")
|
||||
@Option(name = "--target-password", description = "Password used to connect to target broker.")
|
||||
protected String targetPassword;
|
||||
|
||||
@Option(name = "--receive-timeout", description = "Amount of time (in milliseconds) to wait before giving up the loop. 0 means receiveNoWait, -1 means consumer.receive() waiting forever. (default=5000)")
|
||||
@Option(name = "--receive-timeout", description = "Amount of time (in milliseconds) to wait before giving up the receiving loop; 0 means no wait, -1 means wait forever. Default: 5000.")
|
||||
int receiveTimeout = 5000;
|
||||
|
||||
@Option(name = "--source-client-id", description = "ClientID to be associated with connection")
|
||||
@Option(name = "--source-client-id", description = "ClientID to be associated with source connection.")
|
||||
String sourceClientID;
|
||||
|
||||
@Option(name = "--source-protocol", description = "Protocol used. Valid values are amqp or core. Default=core.")
|
||||
@Option(name = "--source-protocol", description = "Protocol used. Valid values are amqp or core. Default: core.")
|
||||
String sourceProtocol = "core";
|
||||
|
||||
@Option(name = "--source-queue", description = "JMS Queue to be used.")
|
||||
@Option(name = "--source-queue", description = "Source JMS queue to be used. Cannot be set with --source-topic.")
|
||||
String sourceQueue;
|
||||
|
||||
@Option(name = "--shared-durable-subscription", description = "Name of a shared subscription name to be used on the input topic")
|
||||
@Option(name = "--shared-durable-subscription", description = "Name of a shared subscription name to be used on the source topic.")
|
||||
String sharedDurableSubscription;
|
||||
|
||||
@Option(name = "--shared-subscription", description = "Name of a shared subscription name to be used on the input topic")
|
||||
@Option(name = "--shared-subscription", description = "Name of a shared subscription name to be used on the source topic.")
|
||||
String sharedSubscription;
|
||||
|
||||
@Option(name = "--durable-consumer", description = "Name of a durable consumer to be used on the input topic")
|
||||
@Option(name = "--durable-consumer", description = "Name of a durable consumer to be used on the source topic.")
|
||||
String durableConsumer;
|
||||
|
||||
@Option(name = "--no-Local", description = "Use noLocal when applicable on topic operation")
|
||||
boolean noLocal;
|
||||
|
||||
@Option(name = "--source-topic", description = "Destination to be used. It can be prefixed with queue:// or topic:// and can be an FQQN in the form of <address>::<queue>. (Default: queue://TEST)")
|
||||
@Option(name = "--source-topic", description = "Source JMS topic to be used. Cannot bet set with --source-queue.")
|
||||
String sourceTopic;
|
||||
|
||||
@Option(name = "--source-filter", description = "filter to be used with the consumer")
|
||||
@Option(name = "--source-filter", description = "Filter to be used with the source consumer.")
|
||||
String filter;
|
||||
|
||||
@Option(name = "--target-protocol", description = "Protocol used. Valid values are amqp or core. Default=core.")
|
||||
@Option(name = "--target-protocol", description = "Protocol used. Valid values are amqp or core. Default: core.")
|
||||
String targetProtocol = "core";
|
||||
|
||||
@Option(name = "--commit-interval", description = "Transaction batch interval.")
|
||||
int commitInterval = 1000;
|
||||
|
||||
@Option(name = "--copy", description = "If this option is chosen we will perform a copy of the queue by rolling back the original TX on the source.")
|
||||
@Option(name = "--copy", description = "If this option is chosen we will perform a copy by rolling back the original transaction on the source.")
|
||||
boolean copy;
|
||||
|
||||
@Option(name = "--target-queue", description = "JMS Queue to be used.")
|
||||
@Option(name = "--target-queue", description = "Target JMS queue to be used. Cannot be set with --target-topic.")
|
||||
String targetQueue;
|
||||
|
||||
@Option(name = "--target-topic", description = "Destination to be used. It can be prefixed with queue:// or topic:// and can be an FQQN in the form of <address>::<queue>. (Default: queue://TEST)")
|
||||
@Option(name = "--target-topic", description = "Target JMS topic to be used. Cannot bet set with --target-queue.")
|
||||
String targetTopic;
|
||||
|
||||
@Option(name = "--message-count", description = "Number of messages to transfer.")
|
||||
|
|
|
@ -33,64 +33,64 @@ import io.netty.channel.EventLoop;
|
|||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
import org.apache.activemq.artemis.jms.client.ActiveMQDestination;
|
||||
|
||||
@Command(name = "client", description = "It will produce and consume messages to a broker instance")
|
||||
@Command(name = "client", description = "Produce messages to and consume messages from a broker instance.")
|
||||
public class PerfClientCommand extends PerfCommand {
|
||||
|
||||
@Option(name = "--tx", description = "Perform Message::acknowledge per each message received (Default: disabled)")
|
||||
@Option(name = "--tx", description = "Perform Message::acknowledge per each message received. Default: disabled.")
|
||||
protected boolean transaction;
|
||||
|
||||
@Option(name = "--shared", description = "Create shared subscription (Default: 0)")
|
||||
@Option(name = "--shared", description = "Create a shared subscription. Default: 0.")
|
||||
protected int sharedSubscription = 0;
|
||||
|
||||
@Option(name = "--durable", description = "Enabled durable subscription (Default: disabled)")
|
||||
@Option(name = "--durable", description = "Enabled durable subscription. Default: disabled.")
|
||||
protected boolean durableSubscription = false;
|
||||
|
||||
@Option(name = "--consumer-connections", description = "Number of consumer connections to be used. Default is same as the total number of consumers")
|
||||
@Option(name = "--consumer-connections", description = "Number of consumer connections to be used. Default: same as the total number of consumers")
|
||||
protected int consumerConnections = 0;
|
||||
|
||||
@Option(name = "--consumers", description = "Number of consumer to use for each generated destination (Default: 1)")
|
||||
@Option(name = "--consumers", description = "Number of consumer to use for each generated destination. Default: 1.")
|
||||
protected int consumersPerDestination = 1;
|
||||
|
||||
@Option(name = "--persistent", description = "It will send messages persistently. Default is non persistent")
|
||||
@Option(name = "--persistent", description = "Send messages persistently. Default: non persistent")
|
||||
protected boolean persistent = false;
|
||||
|
||||
@Option(name = "--message-size", description = "Size of each byteMessage (Default is 1024)")
|
||||
@Option(name = "--message-size", description = "Size of each bytesMessage. Default: is 1024.")
|
||||
protected int messageSize = 1024;
|
||||
|
||||
@Option(name = "--rate", description = "Expected total message rate. (Default is unbounded)")
|
||||
@Option(name = "--rate", description = "Expected total message rate. Default: unbounded.")
|
||||
protected Long rate = null;
|
||||
|
||||
@Option(name = "--ttl", description = "TTL for each message")
|
||||
@Option(name = "--ttl", description = "TTL for each message.")
|
||||
protected long ttl = 0L;
|
||||
|
||||
@Option(name = "--group", description = "Message Group to be used")
|
||||
@Option(name = "--group", description = "Message Group to be used.")
|
||||
protected String msgGroupID = null;
|
||||
|
||||
@Option(name = "--shared-connections", description = "It create --threads shared connections among producers (Default: not shared)")
|
||||
@Option(name = "--shared-connections", description = "Create --threads shared connections among producers. Default: not shared.")
|
||||
protected boolean sharedConnections = false;
|
||||
|
||||
@Option(name = "--tx-size", description = "TX Size")
|
||||
@Option(name = "--tx-size", description = "Transaction size.")
|
||||
protected long txSize;
|
||||
|
||||
@Option(name = "--producers", description = "Number of producers to use for each generated destination (Default: 1)")
|
||||
@Option(name = "--producers", description = "Number of producers to use for each generated destination. Default: 1")
|
||||
protected int producersPerDestination = 1;
|
||||
|
||||
@Option(name = "--threads", description = "Number of worker threads to schedule producer load tasks (Default: 1)")
|
||||
@Option(name = "--threads", description = "Number of worker threads to schedule producer load tasks. Default: 1.")
|
||||
protected int threads = 1;
|
||||
|
||||
@Option(name = "--max-pending", description = "How many not yet completed messages can exists (Default is 1)")
|
||||
@Option(name = "--max-pending", description = "How many not yet completed messages can exists. Default: 1.")
|
||||
protected long maxPending = 1;
|
||||
|
||||
@Option(name = "--consumer-url", description = "Setup the url used for MessageListener(s) connections. Default is same as --url")
|
||||
@Option(name = "--consumer-url", description = "The url used for MessageListener(s) connections. Default: same as --url.")
|
||||
protected String consumerUrl = null;
|
||||
|
||||
@Option(name = "--consumer-protocol", description = "Setup the protocol used for MessageListener(s) connections. Default is same as --protocol")
|
||||
@Option(name = "--consumer-protocol", description = "The protocol used for MessageListener(s) connections. Default: same as --protocol.")
|
||||
protected String consumerProtocol = null;
|
||||
|
||||
@Option(name = "--enable-msg-id", description = "Enable setting JMS messageID per-message (Default: disabled)")
|
||||
@Option(name = "--enable-msg-id", description = "Set JMS messageID per-message. Default: disabled.")
|
||||
protected boolean enableMessageID;
|
||||
|
||||
@Option(name = "--enable-timestamp", description = "Enable setting JMS timestamp per-message (Default: disabled)")
|
||||
@Option(name = "--enable-timestamp", description = "Set JMS timestamp per-message. Default: disabled.")
|
||||
protected boolean enableTimestamp;
|
||||
|
||||
private volatile BenchmarkService producerBenchmark;
|
||||
|
|
|
@ -36,28 +36,28 @@ import static java.util.Collections.singletonList;
|
|||
|
||||
public abstract class PerfCommand extends ConnectionAbstract {
|
||||
|
||||
@Option(name = "--show-latency", description = "Show latencies at interval on output (Default is disabled)")
|
||||
@Option(name = "--show-latency", description = "Show latencies at interval on output. Default: disabled.")
|
||||
protected boolean showLatency = false;
|
||||
|
||||
@Option(name = "--json", description = "Report file name (Default is none)")
|
||||
@Option(name = "--json", description = "Report file name. Default: none.")
|
||||
protected String reportFileName = null;
|
||||
|
||||
@Option(name = "--hdr", description = "HDR Histogram Report file name (Default is none)")
|
||||
@Option(name = "--hdr", description = "HDR Histogram Report file name. Default: none.")
|
||||
protected String hdrFileName = null;
|
||||
|
||||
@Option(name = "--duration", description = "Test duration in seconds (Default: 0)")
|
||||
@Option(name = "--duration", description = "Test duration (in seconds). Default: 0.")
|
||||
protected int duration = 0;
|
||||
|
||||
@Option(name = "--warmup", description = "Warmup in seconds (Default: 0)")
|
||||
@Option(name = "--warmup", description = "Warmup time (in seconds). Default: 0.")
|
||||
protected int warmup = 0;
|
||||
|
||||
@Option(name = "--message-count", description = "Total number of messages (Default: 0)")
|
||||
@Option(name = "--message-count", description = "Total number of messages. Default: 0.")
|
||||
protected long messageCount = 0;
|
||||
|
||||
@Option(name = "--num-destinations", description = "If present, generate --num-destinations for each destination name, using it as a prefix and adding a number [0,--num-destinations) as suffix. (Default: none)")
|
||||
@Option(name = "--num-destinations", description = "If present, generate --num-destinations for each destination name, using it as a prefix and adding a number [0,--num-destinations) as suffix. Default: none.")
|
||||
protected int numDestinations = 1;
|
||||
|
||||
@Arguments(description = "List of destination names. Each name can be prefixed with queue:// or topic:// and can be an FQQN in the form of <address>::<queue>. (Default: queue://TEST)")
|
||||
@Arguments(description = "List of destination names. Each name can be prefixed with queue:// or topic:// and can be an FQQN in the form of <address>::<queue>. Default: queue://TEST.")
|
||||
protected List<String> destinations;
|
||||
|
||||
private final CountDownLatch completed = new CountDownLatch(1);
|
||||
|
|
|
@ -25,22 +25,22 @@ import io.airlift.airline.Command;
|
|||
import io.airlift.airline.Option;
|
||||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
|
||||
@Command(name = "consumer", description = "It will consume messages from a broker instance")
|
||||
@Command(name = "consumer", description = "Consume messages from a queue.")
|
||||
public class PerfConsumerCommand extends PerfCommand {
|
||||
|
||||
@Option(name = "--tx", description = "Perform Message::acknowledge per each message received (Default: disabled)")
|
||||
@Option(name = "--tx", description = "Individually acknowledge each message received. Default: disabled.")
|
||||
protected boolean transaction;
|
||||
|
||||
@Option(name = "--shared", description = "Create shared subscription (Default: 0)")
|
||||
@Option(name = "--shared", description = "Create shared subscription. Default: 0.")
|
||||
protected int sharedSubscription = 0;
|
||||
|
||||
@Option(name = "--durable", description = "Enabled durable subscription (Default: disabled)")
|
||||
@Option(name = "--durable", description = "Enabled durable subscription. Default: disabled.")
|
||||
protected boolean durableSubscription = false;
|
||||
|
||||
@Option(name = "--num-connections", description = "Number of connections to be used. Default is same as the total number of consumers")
|
||||
@Option(name = "--num-connections", description = "Number of connections to be used. Default: same as the total number of consumers.")
|
||||
protected int connections = 0;
|
||||
|
||||
@Option(name = "--consumers", description = "Number of consumer to use for each generated destination (Default: 1)")
|
||||
@Option(name = "--consumers", description = "Number of consumer to use for each generated destination. Default: 1.")
|
||||
protected int consumersPerDestination = 1;
|
||||
|
||||
private BenchmarkService benchmark;
|
||||
|
|
|
@ -32,42 +32,42 @@ import io.netty.channel.DefaultEventLoopGroup;
|
|||
import io.netty.channel.EventLoop;
|
||||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
|
||||
@Command(name = "producer", description = "It will send messages to a broker instance")
|
||||
@Command(name = "producer", description = "Send messages to a broker.")
|
||||
public class PerfProducerCommand extends PerfCommand {
|
||||
@Option(name = "--persistent", description = "It will send messages persistently. Default is non persistent")
|
||||
@Option(name = "--persistent", description = "Send messages persistently. Default: non persistent.")
|
||||
protected boolean persistent = false;
|
||||
|
||||
@Option(name = "--message-size", description = "Size of each byteMessage (Default is 1024)")
|
||||
@Option(name = "--message-size", description = "Size of each bytesMessage. Default: 1024.")
|
||||
protected int messageSize = 1024;
|
||||
|
||||
@Option(name = "--rate", description = "Expected total message rate. (Default is unbounded)")
|
||||
@Option(name = "--rate", description = "Expected total message rate. Default: unbounded.")
|
||||
protected Long rate = null;
|
||||
|
||||
@Option(name = "--ttl", description = "TTL for each message")
|
||||
@Option(name = "--ttl", description = "TTL for each message.")
|
||||
protected long ttl = 0L;
|
||||
|
||||
@Option(name = "--group", description = "Message Group to be used")
|
||||
@Option(name = "--group", description = "Message Group to be used.")
|
||||
protected String msgGroupID = null;
|
||||
|
||||
@Option(name = "--shared-connections", description = "It create --threads shared connections among producers (Default: not shared)")
|
||||
@Option(name = "--shared-connections", description = "Create --threads shared connections among producers. Default: not shared.")
|
||||
protected boolean sharedConnections = false;
|
||||
|
||||
@Option(name = "--tx-size", description = "TX Size")
|
||||
@Option(name = "--tx-size", description = "Transaction size.")
|
||||
protected long txSize;
|
||||
|
||||
@Option(name = "--producers", description = "Number of producers to use for each generated destination (Default: 1)")
|
||||
@Option(name = "--producers", description = "Number of producers to use for each generated destination. Default: 1.")
|
||||
protected int producersPerDestination = 1;
|
||||
|
||||
@Option(name = "--threads", description = "Number of worker threads to schedule producer load tasks (Default: 1)")
|
||||
@Option(name = "--threads", description = "Number of worker threads to schedule producer load tasks. Default: 1.")
|
||||
protected int threads = 1;
|
||||
|
||||
@Option(name = "--max-pending", description = "How many not yet completed messages can exists (Default is 1)")
|
||||
@Option(name = "--max-pending", description = "How many not yet completed messages can exists. Default is 1.")
|
||||
protected long maxPending = 1;
|
||||
|
||||
@Option(name = "--enable-msg-id", description = "Enable setting JMS messageID per-message (Default: disabled)")
|
||||
@Option(name = "--enable-msg-id", description = "Enable setting JMS messageID per-message. Default: disabled.")
|
||||
protected boolean enableMessageID;
|
||||
|
||||
@Option(name = "--enable-timestamp", description = "Enable setting JMS timestamp per-message (Default: disabled)")
|
||||
@Option(name = "--enable-timestamp", description = "Enable setting JMS timestamp per-message. Default: disabled.")
|
||||
protected boolean enableTimestamp;
|
||||
|
||||
protected volatile BenchmarkService benchmark;
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.apache.activemq.artemis.api.core.client.ClientMessage;
|
|||
import org.apache.activemq.artemis.api.core.management.ManagementHelper;
|
||||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
|
||||
@Command(name = "create", description = "create a queue or topic")
|
||||
@Command(name = "create", description = "Create a queue.")
|
||||
public class CreateQueue extends QueueAbstract {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,16 +24,16 @@ import org.apache.activemq.artemis.api.core.management.ManagementHelper;
|
|||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
import org.apache.activemq.artemis.cli.commands.AbstractAction;
|
||||
|
||||
@Command(name = "delete", description = "delete a queue")
|
||||
@Command(name = "delete", description = "Delete a queue.")
|
||||
public class DeleteQueue extends AbstractAction {
|
||||
|
||||
@Option(name = "--name", description = "queue name")
|
||||
@Option(name = "--name", description = "The queue's name")
|
||||
String name;
|
||||
|
||||
@Option(name = "--removeConsumers", description = "whether deleting destination with consumers or not (default false)")
|
||||
@Option(name = "--removeConsumers", description = "Whether to delete the queue even if it has active consumers. Default: false.")
|
||||
boolean removeConsumers = false;
|
||||
|
||||
@Option(name = "--autoDeleteAddress", description = "delete the address if this it's last last queue")
|
||||
@Option(name = "--autoDeleteAddress", description = "Whether to delete the address if this is its only queue.")
|
||||
boolean autoDeleteAddress = false;
|
||||
|
||||
@Override
|
||||
|
@ -77,7 +77,7 @@ public class DeleteQueue extends AbstractAction {
|
|||
|
||||
public String getName() {
|
||||
if (name == null) {
|
||||
name = input("--name", "Please provide the destination name:", "");
|
||||
name = input("--name", "What is the name of the queue?", "");
|
||||
}
|
||||
|
||||
return name;
|
||||
|
|
|
@ -25,10 +25,10 @@ import org.apache.activemq.artemis.api.core.management.ResourceNames;
|
|||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
import org.apache.activemq.artemis.cli.commands.AbstractAction;
|
||||
|
||||
@Command(name = "purge", description = "purge a queue")
|
||||
@Command(name = "purge", description = "Delete all messages in a queue.")
|
||||
public class PurgeQueue extends AbstractAction {
|
||||
|
||||
@Option(name = "--name", description = "queue name")
|
||||
@Option(name = "--name", description = "The queue's name.")
|
||||
String name;
|
||||
|
||||
@Override
|
||||
|
@ -64,7 +64,7 @@ public class PurgeQueue extends AbstractAction {
|
|||
|
||||
public String getName() {
|
||||
if (name == null) {
|
||||
name = input("--name", "Please provide the destination name:", "");
|
||||
name = input("--name", "What is the name of the queue?", "");
|
||||
}
|
||||
|
||||
return name;
|
||||
|
|
|
@ -21,37 +21,37 @@ import org.apache.activemq.artemis.cli.commands.AbstractAction;
|
|||
|
||||
public class QueueAbstract extends AbstractAction {
|
||||
|
||||
@Option(name = "--name", description = "queue name")
|
||||
@Option(name = "--name", description = "The queue's name.")
|
||||
private String name;
|
||||
|
||||
@Option(name = "--filter", description = "queue's filter string (default null)")
|
||||
@Option(name = "--filter", description = "The queue's filter string. Default: null.")
|
||||
private String filter = null;
|
||||
|
||||
@Option(name = "--address", description = "address of the queue (default queue's name)")
|
||||
@Option(name = "--address", description = "The queue's address. Default: queue's name.")
|
||||
private String address;
|
||||
|
||||
@Option(name = "--durable", description = "whether the queue is durable or not (default input)")
|
||||
@Option(name = "--durable", description = "The queue is durable. Default: input.")
|
||||
private Boolean durable;
|
||||
|
||||
@Option(name = "--no-durable", description = "whether the queue is durable or not (default input)")
|
||||
@Option(name = "--no-durable", description = "The queue is not durable. Default: input.")
|
||||
private Boolean noDurable;
|
||||
|
||||
@Option(name = "--purge-on-no-consumers", description = "whether to delete the contents of this queue when its last consumer disconnects (default input)")
|
||||
@Option(name = "--purge-on-no-consumers", description = "Delete the contents of this queue when its last consumer disconnects. Default: input.")
|
||||
private Boolean purgeOnNoConsumers;
|
||||
|
||||
@Option(name = "--preserve-on-no-consumers", description = "whether to preserve the contents of this queue when its last consumer disconnects (default input)")
|
||||
@Option(name = "--preserve-on-no-consumers", description = "Preserve the contents of this queue when its last consumer disconnects. Default: input.")
|
||||
private Boolean preserveOnNoConsumers;
|
||||
|
||||
@Option(name = "--max-consumers", description = "Maximum number of consumers allowed on this queue at any one time (default no limit)")
|
||||
@Option(name = "--max-consumers", description = "The maximum number of concurrent consumers allowed on this queue. Default: no limit.")
|
||||
private Integer maxConsumers;
|
||||
|
||||
@Option(name = "--auto-create-address", description = "Auto create the address (if it doesn't exist) with default values (default input)")
|
||||
@Option(name = "--auto-create-address", description = "Automatically create the address (if it doesn't exist) with default values. Default: input.")
|
||||
private Boolean autoCreateAddress;
|
||||
|
||||
@Option(name = "--anycast", description = "It will determine this queue as anycast (default input)")
|
||||
@Option(name = "--anycast", description = "Create an anycast queue. Default: input.")
|
||||
private Boolean anycast;
|
||||
|
||||
@Option(name = "--multicast", description = "It will determine this queue as multicast (default input)")
|
||||
@Option(name = "--multicast", description = "Create a multicast queue. Default: input.")
|
||||
private Boolean multicast;
|
||||
|
||||
public void setFilter(String filter) {
|
||||
|
@ -67,7 +67,7 @@ public class QueueAbstract extends AbstractAction {
|
|||
String queueName = getName();
|
||||
|
||||
if (requireInput && (address == null || "".equals(address.trim()))) {
|
||||
address = input("--address", "Enter the address name. <Enter for " + queueName + ">", null, true);
|
||||
address = input("--address", "What is the name of the address? <Enter for " + queueName + ">", null, true);
|
||||
}
|
||||
|
||||
if (address == null || "".equals(address.trim())) {
|
||||
|
@ -85,7 +85,7 @@ public class QueueAbstract extends AbstractAction {
|
|||
}
|
||||
|
||||
if (durable == null) {
|
||||
durable = inputBoolean("--durable", "Is this a durable queue", false);
|
||||
durable = inputBoolean("--durable", "Is this a durable queue?", false);
|
||||
}
|
||||
|
||||
return durable;
|
||||
|
@ -114,7 +114,7 @@ public class QueueAbstract extends AbstractAction {
|
|||
|
||||
public boolean isAutoCreateAddress() {
|
||||
if (autoCreateAddress == null) {
|
||||
autoCreateAddress = inputBoolean("--auto-create-address", "should auto create the address if it doesn't exist", false);
|
||||
autoCreateAddress = inputBoolean("--auto-create-address", "Automatically create the address if it doesn't exist?", false);
|
||||
}
|
||||
return autoCreateAddress;
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public class QueueAbstract extends AbstractAction {
|
|||
|
||||
if (anycast == null) {
|
||||
// if it is still null
|
||||
anycast = inputBoolean("--anycast", "is this an anycast queue", false);
|
||||
anycast = inputBoolean("--anycast", "Is this an anycast queue?", false);
|
||||
}
|
||||
}
|
||||
return anycast;
|
||||
|
@ -153,7 +153,7 @@ public class QueueAbstract extends AbstractAction {
|
|||
|
||||
if (multicast == null) {
|
||||
// if it is still null
|
||||
multicast = inputBoolean("--multicast", "is this a multicast queue", false);
|
||||
multicast = inputBoolean("--multicast", "Is this a multicast queue?", false);
|
||||
}
|
||||
}
|
||||
return multicast;
|
||||
|
@ -180,7 +180,7 @@ public class QueueAbstract extends AbstractAction {
|
|||
|
||||
|
||||
if (value == null && useInput) {
|
||||
value = inputBoolean("--purge-on-no-consumers", "Purge the contents of the queue once there are no consumers", false);
|
||||
value = inputBoolean("--purge-on-no-consumers", "Purge the contents of the queue once the last consumer disconnects?", false);
|
||||
}
|
||||
|
||||
if (value == null) {
|
||||
|
@ -214,7 +214,7 @@ public class QueueAbstract extends AbstractAction {
|
|||
|
||||
public String getName() {
|
||||
if (name == null) {
|
||||
name = input("--name", "Please provide the destination name:", "");
|
||||
name = input("--name", "What is the name of the queue?", "");
|
||||
}
|
||||
|
||||
return name;
|
||||
|
@ -222,7 +222,7 @@ public class QueueAbstract extends AbstractAction {
|
|||
|
||||
public String getRoutingType() {
|
||||
if (isAnycast() && isMulticast()) {
|
||||
throw new IllegalArgumentException("--multicast and --anycast are exclusive options for a Queue");
|
||||
throw new IllegalArgumentException("--multicast and --anycast are exclusive options for a queue");
|
||||
}
|
||||
|
||||
if (isMulticast()) {
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.apache.activemq.artemis.cli.commands.ActionContext;
|
|||
import org.apache.activemq.artemis.json.JsonArray;
|
||||
import org.apache.activemq.artemis.json.JsonObject;
|
||||
|
||||
@Command(name = "stat", description = "prints out basic stats associated with queues. Output includes CONSUMER_COUNT (number of consumers), MESSAGE_COUNT (current message count on the queue, including scheduled, paged and in-delivery messages), MESSAGES_ADDED (messages added to the queue), DELIVERING_COUNT (messages broker is currently delivering to consumer(s)), MESSAGES_ACKED (messages acknowledged from the consumer(s))." + " Queues can be filtered using EITHER '--queueName X' where X is contained in the queue name OR using a full filter '--field NAME --operation EQUALS --value X'.")
|
||||
@Command(name = "stat", description = "Print basic stats of a queue. Output includes CONSUMER_COUNT (number of consumers), MESSAGE_COUNT (current message count on the queue, including scheduled, paged and in-delivery messages), MESSAGES_ADDED (messages added to the queue), DELIVERING_COUNT (messages broker is currently delivering to consumer(s)), MESSAGES_ACKED (messages acknowledged from the consumer(s))." + " Queues can be filtered using EITHER '--queueName X' where X is contained in the queue name OR using a full filter '--field NAME --operation EQUALS --value X'.")
|
||||
public class StatQueue extends AbstractAction {
|
||||
|
||||
public enum FIELD {
|
||||
|
@ -68,22 +68,22 @@ public class StatQueue extends AbstractAction {
|
|||
|
||||
public static final int DEFAULT_MAX_COLUMN_SIZE = 25;
|
||||
|
||||
@Option(name = "--queueName", description = "display queue stats for queue(s) with names containing this string.")
|
||||
@Option(name = "--queueName", description = "Display queue stats for queue(s) with names containing this string.")
|
||||
private String queueName;
|
||||
|
||||
@Option(name = "--field", description = "field to use in filter. Possible values NAME, ADDRESS, MESSAGE_COUNT, MESSAGES_ADDED, DELIVERING_COUNT, MESSAGES_ACKED, SCHEDULED_COUNT, ROUTING_TYPE.")
|
||||
@Option(name = "--field", description = "The field to filter. Possible values: NAME, ADDRESS, MESSAGE_COUNT, MESSAGES_ADDED, DELIVERING_COUNT, MESSAGES_ACKED, SCHEDULED_COUNT, ROUTING_TYPE.")
|
||||
private String fieldName;
|
||||
|
||||
@Option(name = "--operation", description = "operation to use in filter. Possible values CONTAINS, NOT_CONTAINS, EQUALS, GREATER_THAN, LESS_THAN.")
|
||||
@Option(name = "--operation", description = "The operation to filter. Possible values: CONTAINS, NOT_CONTAINS, EQUALS, GREATER_THAN, LESS_THAN.")
|
||||
private String operationName;
|
||||
|
||||
@Option(name = "--value", description = "value to use in the filter.")
|
||||
@Option(name = "--value", description = "The value to filter.")
|
||||
private String value;
|
||||
|
||||
@Option(name = "--maxRows", description = "max number of queues displayed. Default is 50.")
|
||||
@Option(name = "--maxRows", description = "The max number of queues displayed. Default is 50.")
|
||||
private int maxRows = DEFAULT_MAX_ROWS;
|
||||
|
||||
@Option(name = "--maxColumnSize", description = "max width of data column. Set to -1 for no limit. Default is 25.")
|
||||
@Option(name = "--maxColumnSize", description = "The max width of data column. Set to -1 for no limit. Default is 25.")
|
||||
private int maxColumnSize = DEFAULT_MAX_COLUMN_SIZE;
|
||||
|
||||
private int statCount = 0;
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.apache.activemq.artemis.api.core.client.ClientMessage;
|
|||
import org.apache.activemq.artemis.api.core.management.ManagementHelper;
|
||||
import org.apache.activemq.artemis.cli.commands.ActionContext;
|
||||
|
||||
@Command(name = "update", description = "update a core queue")
|
||||
@Command(name = "update", description = "Update a queue.")
|
||||
public class UpdateQueue extends QueueAbstract {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -59,31 +59,31 @@ public class DBOption extends OptionalLocking {
|
|||
|
||||
protected ScheduledExecutorService scheduledExecutorService;
|
||||
|
||||
@Option(name = "--output", description = "Output name for the file")
|
||||
@Option(name = "--output", description = "Output name for the file.")
|
||||
private String output;
|
||||
|
||||
@Option(name = "--jdbc", description = "It will activate jdbc")
|
||||
@Option(name = "--jdbc", description = "Whether to store message data in JDBC instead of local files.")
|
||||
Boolean jdbc;
|
||||
|
||||
@Option(name = "--jdbc-bindings-table-name", description = "Name of the jdbc bindigns table")
|
||||
@Option(name = "--jdbc-bindings-table-name", description = "Name of the jdbc bindings table.")
|
||||
private String jdbcBindings = ActiveMQDefaultConfiguration.getDefaultBindingsTableName();
|
||||
|
||||
@Option(name = "--jdbc-message-table-name", description = "Name of the jdbc messages table")
|
||||
private String jdbcMessages = ActiveMQDefaultConfiguration.getDefaultLargeMessagesTableName();
|
||||
@Option(name = "--jdbc-message-table-name", description = "Name of the jdbc messages table.")
|
||||
private String jdbcMessages = ActiveMQDefaultConfiguration.getDefaultMessageTableName();
|
||||
|
||||
@Option(name = "--jdbc-large-message-table-name", description = "Name of the large messages table")
|
||||
@Option(name = "--jdbc-large-message-table-name", description = "Name of the large messages table.")
|
||||
private String jdbcLargeMessages = ActiveMQDefaultConfiguration.getDefaultLargeMessagesTableName();
|
||||
|
||||
@Option(name = "--jdbc-page-store-table-name", description = "Name of the page store messages table")
|
||||
@Option(name = "--jdbc-page-store-table-name", description = "Name of the page store messages table.")
|
||||
private String jdbcPageStore = ActiveMQDefaultConfiguration.getDefaultPageStoreTableName();
|
||||
|
||||
@Option(name = "--jdbc-node-manager-table-name", description = "Name of the jdbc node manager table")
|
||||
@Option(name = "--jdbc-node-manager-table-name", description = "Name of the jdbc node manager table.")
|
||||
private String jdbcNodeManager = ActiveMQDefaultConfiguration.getDefaultNodeManagerStoreTableName();
|
||||
|
||||
@Option(name = "--jdbc-connection-url", description = "The connection used for the database")
|
||||
@Option(name = "--jdbc-connection-url", description = "The URL used for the database connection.")
|
||||
private String jdbcURL = null;
|
||||
|
||||
@Option(name = "--jdbc-driver-class-name", description = "JDBC driver classname")
|
||||
@Option(name = "--jdbc-driver-class-name", description = "JDBC driver classname.")
|
||||
private String jdbcClassName = ActiveMQDefaultConfiguration.getDefaultDriverClassName();
|
||||
|
||||
public boolean isJDBC() throws Exception {
|
||||
|
|
|
@ -27,16 +27,16 @@ import org.apache.activemq.artemis.cli.commands.Configurable;
|
|||
*/
|
||||
public abstract class DataAbstract extends Configurable {
|
||||
|
||||
@Option(name = "--bindings", description = "The folder used for bindings (default from broker.xml)")
|
||||
@Option(name = "--bindings", description = "The folder used for bindings. Default: read from broker.xml.")
|
||||
public String binding;
|
||||
|
||||
@Option(name = "--journal", description = "The folder used for messages journal (default from broker.xml)")
|
||||
@Option(name = "--journal", description = "The folder used for normal messages. Default: read from broker.xml.")
|
||||
public String journal;
|
||||
|
||||
@Option(name = "--paging", description = "The folder used for paging (default from broker.xml)")
|
||||
@Option(name = "--paging", description = "The folder used for paged messages. Default: read from broker.xml.")
|
||||
public String paging;
|
||||
|
||||
@Option(name = "--large-messages", description = "The folder used for large-messages (default from broker.xml)")
|
||||
@Option(name = "--large-messages", description = "The folder used for large-messages. Default: read from broker.xml.")
|
||||
public String largeMessges;
|
||||
|
||||
public String getLargeMessages() throws Exception {
|
||||
|
|
|
@ -64,24 +64,24 @@ import org.apache.activemq.artemis.utils.actors.ArtemisExecutor;
|
|||
import org.apache.activemq.artemis.utils.collections.LinkedList;
|
||||
import org.apache.activemq.artemis.utils.collections.LinkedListIterator;
|
||||
|
||||
@Command(name = "print", description = "Print data records information (WARNING: don't use while a production server is running)")
|
||||
@Command(name = "print", description = "Print data records information. WARNING: don't use while a production server is running.")
|
||||
public class PrintData extends DBOption {
|
||||
|
||||
|
||||
@Option(name = "--safe", description = "It will print your data structure without showing your data")
|
||||
@Option(name = "--safe", description = "Print your data structure without showing your data.")
|
||||
private boolean safe = false;
|
||||
|
||||
|
||||
@Option(name = "--reclaimed", description = "This option will try to print as many records as possible from reclaimed files")
|
||||
@Option(name = "--reclaimed", description = "Try to print as many records as possible from reclaimed files.")
|
||||
private boolean reclaimed = false;
|
||||
|
||||
@Option(name = "--max-pages", description = "It will print your data structure without showing your data")
|
||||
@Option(name = "--max-pages", description = "Maximum number of pages to read. Default: unlimited (-1).")
|
||||
private int maxPages = -1;
|
||||
|
||||
@Option(name = "--skip-bindings", description = "It will ignore printing the bindings journal")
|
||||
@Option(name = "--skip-bindings", description = "Do not print data from the bindings journal.")
|
||||
private boolean skipBindings = false;
|
||||
|
||||
@Option(name = "--skip-journal", description = "It will ignore printing the messages journal")
|
||||
@Option(name = "--skip-journal", description = "Do not print data from the messages journal.")
|
||||
private boolean skipJournal = false;
|
||||
|
||||
private static final String BINDINGS_BANNER = "B I N D I N G S J O U R N A L";
|
||||
|
|
|
@ -38,17 +38,17 @@ import org.apache.activemq.artemis.core.persistence.impl.journal.JournalRecordId
|
|||
import org.apache.activemq.artemis.spi.core.protocol.MessagePersister;
|
||||
import org.apache.activemq.artemis.utils.ByteUtil;
|
||||
|
||||
@Command(name = "recover", description = "Recover (undelete) every message on the journal by creating a new output journal. Rolled backed and acked messages will be sent out to the output as much as possible.")
|
||||
@Command(name = "recover", description = "Recover (undelete) every message on the journal by creating a new output journal. Rolled back and acked messages will be sent out to the output as much as possible.")
|
||||
public class RecoverMessages extends DBOption {
|
||||
|
||||
static {
|
||||
MessagePersister.registerPersister(CoreMessagePersister.getInstance());
|
||||
}
|
||||
|
||||
@Option(name = "--reclaimed", description = "This option will try to recover as many records as possible from reclaimed files")
|
||||
@Option(name = "--reclaimed", description = "Try to recover as many records as possible from reclaimed files.")
|
||||
private boolean reclaimed = false;
|
||||
|
||||
@Option(name = "--target", description = "Output folder container the new journal with all the generated messages", required = true)
|
||||
@Option(name = "--target", description = "Output folder container the new journal with all the generated messages.", required = true)
|
||||
private String outputJournal;
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
|
|||
import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
|
||||
import org.apache.activemq.artemis.core.persistence.impl.journal.JournalRecordIds;
|
||||
|
||||
@Command(name = "compact", description = "Compacts the journal of a non running server")
|
||||
@Command(name = "compact", description = "Compact the journal of a non running server.")
|
||||
public final class CompactJournal extends LockAbstract {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,22 +36,22 @@ import org.apache.activemq.artemis.core.journal.RecordInfo;
|
|||
import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
|
||||
import org.apache.activemq.artemis.utils.Base64;
|
||||
|
||||
@Command(name = "decode", description = "Decode a journal's internal format into a new journal set of files")
|
||||
@Command(name = "decode", description = "Decode a journal's internal format into a new set of journal files.")
|
||||
public class DecodeJournal extends LockAbstract {
|
||||
|
||||
@Option(name = "--directory", description = "The journal folder (default journal folder from broker.xml)")
|
||||
@Option(name = "--directory", description = "The journal folder. Default: read 'journal-directory' from broker.xml.")
|
||||
public String directory;
|
||||
|
||||
@Option(name = "--prefix", description = "The journal prefix (default activemq-data)")
|
||||
@Option(name = "--prefix", description = "The journal prefix. Default: activemq-data.")
|
||||
public String prefix = "activemq-data";
|
||||
|
||||
@Option(name = "--suffix", description = "The journal suffix (default amq)")
|
||||
@Option(name = "--suffix", description = "The journal suffix. Default: amq.")
|
||||
public String suffix = "amq";
|
||||
|
||||
@Option(name = "--file-size", description = "The journal size (default 10485760)")
|
||||
@Option(name = "--file-size", description = "The journal size. Default: 10485760.")
|
||||
public int size = 10485760;
|
||||
|
||||
@Option(name = "--input", description = "The input file name (default=exp.dmp)", required = true)
|
||||
@Option(name = "--input", description = "The input file name. Default: exp.dmp.", required = true)
|
||||
public String input = "exp.dmp";
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,19 +34,19 @@ import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
|
|||
import org.apache.activemq.artemis.core.journal.impl.JournalReaderCallback;
|
||||
import org.apache.activemq.artemis.utils.Base64;
|
||||
|
||||
@Command(name = "encode", description = "Encode a set of journal files into an internal encoded data format")
|
||||
@Command(name = "encode", description = "Encode a set of journal files into an internal encoded data format.")
|
||||
public class EncodeJournal extends LockAbstract {
|
||||
|
||||
@Option(name = "--directory", description = "The journal folder (default the journal folder from broker.xml)")
|
||||
@Option(name = "--directory", description = "The journal folder. Default: read 'journal-directory' from broker.xml.")
|
||||
public String directory;
|
||||
|
||||
@Option(name = "--prefix", description = "The journal prefix (default activemq-data)")
|
||||
@Option(name = "--prefix", description = "The journal prefix. Default: activemq-data.")
|
||||
public String prefix = "activemq-data";
|
||||
|
||||
@Option(name = "--suffix", description = "The journal suffix (default amq)")
|
||||
@Option(name = "--suffix", description = "The journal suffix. Default: amq.")
|
||||
public String suffix = "amq";
|
||||
|
||||
@Option(name = "--file-size", description = "The journal size (default 10485760)")
|
||||
@Option(name = "--file-size", description = "The journal size. Default: 10485760.")
|
||||
public int size = 10485760;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,35 +26,35 @@ import org.apache.activemq.artemis.cli.commands.util.SyncCalculation;
|
|||
import org.apache.activemq.artemis.core.config.impl.FileConfiguration;
|
||||
import org.apache.activemq.artemis.core.server.JournalType;
|
||||
|
||||
@Command(name = "perf-journal", description = "Calculates the journal-buffer-timeout you should use with the current data folder")
|
||||
@Command(name = "perf-journal", description = "Calculate the journal-buffer-timeout to use with the current data folder.")
|
||||
public class PerfJournal extends OptionalLocking {
|
||||
|
||||
|
||||
@Option(name = "--block-size", description = "The block size for each write (default 4096)")
|
||||
@Option(name = "--block-size", description = "The block size for each write. Default 4096.")
|
||||
public int size = 4 * 1024;
|
||||
|
||||
@Option(name = "--writes", description = "The number of writes to be performed (default 250)")
|
||||
@Option(name = "--writes", description = "The number of writes to be performed. Default: 250.")
|
||||
public int writes = 250;
|
||||
|
||||
@Option(name = "--tries", description = "The number of tries for the test (default 5)")
|
||||
@Option(name = "--tries", description = "The number of tries for the test. Default: 5.")
|
||||
public int tries = 5;
|
||||
|
||||
@Option(name = "--no-sync", description = "Disable sync")
|
||||
@Option(name = "--no-sync", description = "Disable syncs.")
|
||||
public boolean nosyncs = false;
|
||||
|
||||
@Option(name = "--sync", description = "Enable syncs")
|
||||
@Option(name = "--sync", description = "Enable syncs.")
|
||||
public boolean syncs = false;
|
||||
|
||||
@Option(name = "--journal-type", description = "Journal Type to be used (default from broker.xml)")
|
||||
@Option(name = "--journal-type", description = "Journal type to be used: Default: read from broker.xml.")
|
||||
public String journalType = null;
|
||||
|
||||
@Option(name = "--sync-writes", description = "It will perform each write synchronously, like if you had a single producer")
|
||||
@Option(name = "--sync-writes", description = "Perform each write synchronously, e.g. if there was a single producer.")
|
||||
public boolean syncWrites = false;
|
||||
|
||||
@Option(name = "--file", description = "The file name to be used (default test.tmp)")
|
||||
@Option(name = "--file", description = "The file name to be used. Default: test.tmp.")
|
||||
public String fileName = "test.tmp";
|
||||
|
||||
@Option(name = "--max-aio", description = "libaio.maxAIO to be used (default: configuration::getJournalMaxIO_AIO()")
|
||||
@Option(name = "--max-aio", description = "libaio.maxAIO to be used. Default: read from broker.xml.")
|
||||
public int maxAIO = 0;
|
||||
|
||||
|
||||
|
|
|
@ -91,28 +91,28 @@ public final class XmlDataImporter extends ActionAbstract {
|
|||
|
||||
private ClientSession session;
|
||||
|
||||
@Option(name = "--host", description = "The host used to import the data (default localhost)")
|
||||
@Option(name = "--host", description = "The host used to import the data. Default: localhost.")
|
||||
public String host = "localhost";
|
||||
|
||||
@Option(name = "--port", description = "The port used to import the data (default 61616)")
|
||||
@Option(name = "--port", description = "The port used to import the data. Default: 61616.")
|
||||
public int port = 61616;
|
||||
|
||||
@Option(name = "--transaction", description = "If this is set to true you will need a whole transaction to commit at the end. (default false)")
|
||||
@Option(name = "--transaction", description = "Import every message using a single transction. If anything goes wrong during the process the entire import will be aborted. Default: false.")
|
||||
public boolean transactional;
|
||||
|
||||
@Option(name = "--user", description = "User name used to import the data. (default null)")
|
||||
@Option(name = "--user", description = "User name used to import the data. Default: null.")
|
||||
public String user = null;
|
||||
|
||||
@Option(name = "--password", description = "User name used to import the data. (default null)")
|
||||
@Option(name = "--password", description = "User name used to import the data. Default: null.")
|
||||
public String password = null;
|
||||
|
||||
@Option(name = "--input", description = "The input file name (default=exp.dmp)", required = true)
|
||||
@Option(name = "--input", description = "The input file name. Default: exp.dmp.", required = true)
|
||||
public String input = "exp.dmp";
|
||||
|
||||
@Option(name = "--sort", description = "Sort the messages from the input (used for older versions that won't sort messages)")
|
||||
@Option(name = "--sort", description = "Sort the messages from the input (used for older versions that won't sort messages).")
|
||||
public boolean sort = false;
|
||||
|
||||
@Option(name = "--legacy-prefixes", description = "Do not remove prefixes from legacy imports")
|
||||
@Option(name = "--legacy-prefixes", description = "Do not remove prefixes from legacy imports.")
|
||||
public boolean legacyPrefixes = false;
|
||||
|
||||
TreeSet<XMLMessageImporter.MessageInfo> messages;
|
||||
|
|
|
@ -27,10 +27,10 @@ import org.apache.activemq.artemis.cli.commands.ActionContext;
|
|||
* Adding a new user, example:
|
||||
* ./artemis user add --user-command-user guest --role admin --user-command-password ***
|
||||
*/
|
||||
@Command(name = "add", description = "Add a new user")
|
||||
@Command(name = "add", description = "Add a user.")
|
||||
public class AddUser extends PasswordAction {
|
||||
|
||||
@Option(name = "--plaintext", description = "store the password in plaintext (Default: false)")
|
||||
@Option(name = "--plaintext", description = "Store the password in plaintext. Default: false.")
|
||||
boolean plaintext = false;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.apache.activemq.artemis.cli.commands.ActionContext;
|
|||
* list existing users, example:
|
||||
* ./artemis user list --user guest
|
||||
*/
|
||||
@Command(name = "list", description = "List existing user(s)")
|
||||
@Command(name = "list", description = "List user(s).")
|
||||
public class ListUser extends UserAction {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,12 +20,12 @@ import io.airlift.airline.Option;
|
|||
|
||||
public class PasswordAction extends UserAction {
|
||||
|
||||
@Option(name = "--user-command-password", description = "The password to use for the chosen user command (Default: input)")
|
||||
@Option(name = "--user-command-password", description = "The password to use for the chosen user command. Default: input.")
|
||||
String userCommandPassword;
|
||||
|
||||
void checkInputPassword() {
|
||||
if (userCommandPassword == null) {
|
||||
userCommandPassword = inputPassword("--user-command-password", "Please provide the password to use for the chosen user command:", null);
|
||||
userCommandPassword = inputPassword("--user-command-password", "What is the password to use for the chosen user command?", null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.apache.activemq.artemis.cli.commands.ActionContext;
|
|||
* Remove a user, example:
|
||||
* ./artemis user rm --user guest
|
||||
*/
|
||||
@Command(name = "rm", description = "Remove an existing user")
|
||||
@Command(name = "rm", description = "Remove an existing user.")
|
||||
public class RemoveUser extends UserAction {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,10 +27,10 @@ import org.apache.activemq.artemis.cli.commands.ActionContext;
|
|||
* Reset a user's password or roles, example:
|
||||
* ./artemis user reset --user guest --role admin --password ***
|
||||
*/
|
||||
@Command(name = "reset", description = "Reset user's password or roles")
|
||||
@Command(name = "reset", description = "Reset user's password or roles.")
|
||||
public class ResetUser extends PasswordAction {
|
||||
|
||||
@Option(name = "--plaintext", description = "store the password in plaintext (Default: false)")
|
||||
@Option(name = "--plaintext", description = "Store the password in plaintext. Default: false.")
|
||||
boolean plaintext = false;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,10 +21,10 @@ import org.apache.activemq.artemis.cli.commands.AbstractAction;
|
|||
|
||||
public abstract class UserAction extends AbstractAction {
|
||||
|
||||
@Option(name = "--role", description = "user's role(s), comma separated")
|
||||
@Option(name = "--role", description = "The user's role(s). Separate multiple roles with comma.")
|
||||
String role;
|
||||
|
||||
@Option(name = "--user-command-user", description = "The username to use for the chosen user command (Default: input)")
|
||||
@Option(name = "--user-command-user", description = "The username to use for the chosen user command. Default: input.")
|
||||
String userCommandUser = null;
|
||||
|
||||
void checkInputUser() {
|
||||
|
@ -35,7 +35,7 @@ public abstract class UserAction extends AbstractAction {
|
|||
|
||||
void checkInputRole() {
|
||||
if (role == null) {
|
||||
role = input("--role", "type a comma separated list of roles", null);
|
||||
role = input("--role", "What is the user's role(s)? Separate multiple roles with comma.", null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue