public class RabbitMqCtl extends RabbitMqDiagnostics
rabbitmqctl.
The methods contained in this class aren't exhaustive. Please refer to the manual for a complete list.
| Constructor and Description |
|---|
RabbitMqCtl(EmbeddedRabbitMqConfig config) |
RabbitMqCtl(EmbeddedRabbitMqConfig config,
Map<String,String> extraEnvVars) |
RabbitMqCtl(EmbeddedRabbitMqConfig config,
Set<String> envVarsToDiscard,
Map<String,String> envVarsToAdd) |
RabbitMqCtl(RabbitMqCommand.ProcessExecutorFactory processExecutorFactory,
File appFolder,
Map<String,String> envVars) |
| Modifier and Type | Method and Description |
|---|---|
Future<org.zeroturnaround.exec.ProcessResult> |
forceReset()
Forcefully return a RabbitMQ node to its virgin state.
|
protected String |
getCommand() |
Future<org.zeroturnaround.exec.ProcessResult> |
reset()
Return a RabbitMQ node to its virgin state.
|
Future<org.zeroturnaround.exec.ProcessResult> |
startApp()
Starts the RabbitMQ application.
|
Future<org.zeroturnaround.exec.ProcessResult> |
stop()
Stops the Erlang node on which RabbitMQ is running.
|
Future<org.zeroturnaround.exec.ProcessResult> |
stopApp()
Stops the RabbitMQ application, leaving the Erlang node running.
|
execute, mapFilterAndAppendpublic static final String COMMAND
public RabbitMqCtl(EmbeddedRabbitMqConfig config)
public RabbitMqCtl(EmbeddedRabbitMqConfig config, Map<String,String> extraEnvVars)
public RabbitMqCtl(EmbeddedRabbitMqConfig config, Set<String> envVarsToDiscard, Map<String,String> envVarsToAdd)
public RabbitMqCtl(RabbitMqCommand.ProcessExecutorFactory processExecutorFactory, File appFolder, Map<String,String> envVars)
public Future<org.zeroturnaround.exec.ProcessResult> stop() throws RabbitMqCommandException
RabbitMqCommandExceptionpublic Future<org.zeroturnaround.exec.ProcessResult> stopApp() throws RabbitMqCommandException
This command is typically run prior to performing other management actions that require the
RabbitMQ application to be stopped, e.g. reset().
RabbitMqCommandExceptionpublic Future<org.zeroturnaround.exec.ProcessResult> startApp() throws RabbitMqCommandException
This command is typically run after performing other management actions that required the
RabbitMQ application to be stopped, e.g. reset().
RabbitMqCommandExceptionpublic Future<org.zeroturnaround.exec.ProcessResult> reset() throws RabbitMqCommandException
Removes the node from any cluster it belongs to, removes all data from the management database, such as configured users and vhosts, and deletes all persistent messages.
For reset and force_reset to succeed the RabbitMQ application must have been stopped, e.g. with stopApp()
RabbitMqCommandExceptionpublic Future<org.zeroturnaround.exec.ProcessResult> forceReset() throws RabbitMqCommandException
The force_reset command differs from reset in that it resets the node unconditionally, regardless of the current management database state and cluster configuration. It should only be used as a last resort if the database or cluster configuration has been corrupted.
For reset and force_reset to succeed the RabbitMQ application must have been stopped, e.g. with stopApp()
RabbitMqCommandExceptionprotected String getCommand()
getCommand in class RabbitMqDiagnosticsCopyright © 2016–2021. All rights reserved.