Reputation: 163
I use both JBoss AS 4 (JBoss MQ) and JBoss AS 7 (Hornet Q). I would like to configure the place of storing the queue. In destination of JBoss AS 4 /jboss/server/default/deploy I have default-ds.xml which I believe is configuration of storing queue in database :
DefaultDS
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:h2:${jboss.server.data.dir}${/}h2${/}localDB;LOCK_TIMEOUT=360000;DB_CLOSE_ON_EXIT=FALSE</xa-datasource-property>
<user-name>sa</user-name>
<min-pool-size>1</min-pool-size>
<max-pool-size>10</max-pool-size>
<track-connection-by-tx />
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
</xa-datasource>
I would like to know is there such file in JBOSS AS 7 by hornetQ which will help me to configure storing queues. I need to keep the queue between restarts of server , etc. Where is the file? Is it just standalone.xml?
Upvotes: 0
Views: 3122
Reputation: 5208
HornetQ only supports file persistence. HornetQ uses a set of binary journal files to store the messages in the queues.
The information by default is stored in $JBOSS_HOME/standalone/data (messagingbindings, messagingjournal and messaginglargemessages directory)
.
You can change the default directory, modifying the messaging subsystem in the standalone.xml
file.
Eg
<subsystem xmlns="urn:jboss:domain:messaging:1.1">
<hornetq-server>
<!-- first of all we want to use a journal on disk (this is important) -->
<persistence-enabled>true</persistence-enabled>
<journal-directory path="path/to/journal" relative-to="user.home"/>
<bindings-directory path="path/to/bindings" relative-to="user.home"/>
<large-messages-directory path="path/to/large-message" relative-to="user.home"/>
<paging-directory path="path/to/paging" relative-to="user.home"/>
<!-- ... -->
</hornetq-server>
</subsystem>
Note the path is always relative to relative-to property (system property, in this example user home) . Not is possible define absolute path.
Upvotes: 1