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.
Module
ActiveMQ
Proposal
An
ArtemisContaineris 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):
I wonder about
/var/lib/artemis-instance/bin/artemisand the--userand--passwordelement. 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.