Reputation: 525
I created a queue via this JMX operation:
org.apache.activemq.artemis:broker="brokerNew"::createQueue(java.lang.String,java.lang.String,java.lang.String)
And I thought it would be written to broker.xml
in the addresses
section. However, it was saved in some of the files from the data
directory.
What is the difference between queues written in a broker.xml
file and created through JMX?
Upvotes: 1
Views: 261
Reputation: 35038
Durable queues created at runtime (e.g. via JMX management operations or auto-created by the broker) are not added to broker.xml
. Updating broker.xml
for every queue created could severely impact broker performance. The broker can serve thousands of clients simultaneously potentially auto-creating addresses and queues almost constantly. Having to update a potentially large XML file in a thread-safe way would be a significant bottleneck.
Instead, durable queues created at runtime are stored in the "bindings" journal which uses the same technology as the high performance message journal. All the queues from the bindings journal are reloaded when the broker restarts just like queues configured in broker.xml
.
Aside from where the physical definitions of the queues are stored there is no difference between queues in broker.xml
and those in the bindings journal. They should function exactly the same.
Upvotes: 2