-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Enhancement]: Ease the invocation of the Artemis CLI #11589
Copy link
Copy link
Open
Labels
Description
Module
ActiveMQ
Proposal
An ArtemisContainer is bundled with the Artemis CLI that lets you administer the broker.
Here is an example of how you can create a queue (useful when testing against AMQP 1.0 as the queue isn't created automatically):
private void createQueue(String name) {
try {
ExecResult execResult = container.execInContainer("/var/lib/artemis-instance/bin/artemis", "queue",
"create", "--name=" + name, "--auto-create-address", "--anycast", "--silent",
"--user=" + container.getUser(), "--password=" + container.getPassword());
if (execResult.getExitCode() != 0) {
throw new IllegalStateException("Failed to create queue: " + execResult.getStderr());
}
}
catch (Exception ex) {
throw new IllegalStateException("Failed to create queue " + name, ex);
}
}I wonder about /var/lib/artemis-instance/bin/artemis and the --user and --password element. It'd certainly be nice if we could have a bit of syntaxic sugar where you could "just" invoke the artemis command without having to deal with this. It'd also be a nice way to promote that feature in the API.
Reactions are currently unavailable