Configure Shared File System Master Slave for ActiveMQ

You must manually configure the Shared File System Master Slave if you are not using the JDBC (Database) Master Slave configuration option to store FIFO data for ActiveMQ.
Note: Configuring FIFO messaging in a cluster for ActiveMQ is a prerequisite to configure the Shared File System Master Slave for ActiveMQ. For information on configuring FIFO messaging in a cluster, see ‘Cluster Configuration ’.

To configure shared file system master slave for ActiveMQ:

  1. In the activemq.xml file, comment out the following section:

    XML comments consist of the symbols, '&lt!--' to open the comment and '-->' to close the comment.

    &lt!-- Database Storage Option -->
    &lt!-- This section has been commented.
    
    &ltpersistenceAdapter>
          &ltjdbcPersistenceAdapter dataSource="#fifo-ds" useDatabaseLock="true">
            &ltstatements>
              &ltstatements tablePrefix="FIFO_"/>
            &lt/statements>
          </jdbcPersistenceAdapter>
    </persistenceAdapter>
    -->
  2. Uncomment the following section by removing the symbols '<!--' and '-->'.
    <!-- File system Storage Option -->
     <persistenceAdapter>
        <journaledJDBC dataDirectory="/sharedFileSystem/broker"/>
    </persistenceAdapter>
  3. Edit the dataDirectory parameter to point to the location of the shared data directory to be used. This data directory must point to the same physical data location for all ActiveMQ instances in the network.
    For information on warnings about shared file system choices as a result of locking limitations, see ‘Shared File System Assumptions and Limitations ’.
  4. Restart each ActiveMQ node when you reconfigure it.