Due to a known issue do not use JDK1.8.0_151 with WSO2 products. Use JDK 1.8.0_144 until JDK 1.8.0_162-ea is released.
This documentation is for WSO2 Message Broker version 3.2.0. For the latest documentation, see the documentation for WSO2 Enterprise Integrator.
Skip to end of metadata
Go to start of metadata

To configure and run MySQL as your RDBMS, you must do the following.

  1. Open the <MB_HOME>/repository/conf/datasources/master-datasources.xml file. This is where datasources are configured to point to the databases used by the Message Broker. This file consists of commented out configurations for datasources. The datasource configuration for MySQL is among these. The changes made to this file must be done in both broker nodes.
  2. Uncomment or add the following configuration into the master-datasources.xml file. Update the JDBC URL to correctly point to your database and enter the username and password for a MySQL database user with the proper permissions.

     <datasource>
                 <name>MYSQL_DATA_SOURCE</name>
                 <jndiConfig>
                     <name>jdbc/MySQLMessageStore</name>
                 </jndiConfig>
                 <definition type="RDBMS">
                     <configuration>
    					 <defaultAutoCommit>false</defaultAutoCommit>
                         <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                         <url>jdbc:mysql://localhost/WSO2_MB</url>
                         <username>root</username>
                         <password>root</password>
                     </configuration>
                 </definition>
    </datasource>

     

  3. Open the <MB_HOME>/repository/conf/broker.xml file. This is the root configuration file of Message Broker. The changes made to this file must be done in all the WSO2 Message Broker nodes.
  4. In the broker.xml file we need to use the MySQL message store and Andes context store. To do this, uncomment or add the following configuration.

    ...
    <persistence>
      <messageStore class="org.wso2.andes.store.rdbms.RDBMSMessageStoreImpl">
            <property name="dataSource">jdbc/MySQLMessageStore</property>
      </messageStore>
    
      <andesContextStore    class="org.wso2.andes.store.rdbms.RDBMSAndesContextStoreImpl">
            <property name="dataSource">jdbc/MySQLMessageStore</property>
      </andesContextStore>
    ...
    </persistence>
  • No labels