I am running WildFly 17 in domain mode. We have been adding JMS queues manually, but I would rather add the configurations as part of the deployment script. I can create servers and datasources with jboss-cli
, but I can't seem to make any headway with queues. I would like to end up with domain_config.xml looking something like:
<subsystem xmlns="urn:jboss:domain:messaging-activemq:7.0">
<server name="default">
...
<jms-queue name="MyQueue" entries="java:/queue/MyQueue" durable="true"/>
I have looked at How to set up messaging subsystem using CLI in Wildfly, but all I get back is errors.
[domain@machine.foo.com:9990 /] /subsystem=messaging-activemq/server=default/jms- queue=MyQueue:add(entries=[java:/jms/queue/MyQueue])
Failed to get the list of the operation properties: "WFLYCTL0030: No resource definition is
registered for address [
("subsystem" => "messaging-activemq"),
("server" => "default"),
("jms-queue" => "MyQueue")
]"
The full nesting of domain_config.xml is:
<domain xmlns="urn:jboss:domain:10.0">
<profiles>
<profile name="full">
<subsystem xmlns="urn:jboss:domain:messaging-activemq:7.0">
<server name="default">
<jms-queue name="MyQueue" entries="java:/queue/MyQueue" durable="true"/>
Working in domain mode is very different from standalone mode mainly because you must specify the "profile" your commands should apply to. For example, if you were in domain mode and there was a profile called "full" in the domain and you wanted to add a JMS named "foo" to that domain then you could execute this command:
jms-queue --profile=full add --queue-address=foo --entries=["java:/jms/queue/foo"]
You can use the help --commands
command to see a list of available commands and then drill down into the help for any of those commands.