This documentation is for WSO2 Message Broker 3.0.0. View documentation for the latest release.
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.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. To connect MB 3.0.0 to the new database for user management and registry data, update the following configuration files:
    1. Configure the <MB_HOME_3.0.0>/repository/conf/datasources/master­datasources.xml file. This configuration should point to the new database that you set up in the previous section. See the following example:

      Code Block
      <datasource>
      user manager</description>
      <name>WSO2_CARBON_DB</name>
      <description>The datasource used for registry and
      <jndiConfig>
      <name>jdbc/WSO2CarbonDB</name>
      </jndiConfig>
      <definition type="RDBMS">
      <configuration>
      <url>jdbc:mysql://localhost:3306/<new_database></url>
      <username>username</username>
      <password>password</password>
      <driverClassName>com.mysql.jdbc.Driver</driverClassName>
      <maxActive>80</maxActive>
      <maxWait>60000</maxWait>
      <minIdle>5</minIdle>
      <testOnBorrow>true</testOnBorrow>
      <validationQuery>SELECT1</validationQuery>
      <validationInterval>30000</validationInterval>
      </configuration>
      </definition>
      </datasource>
    2. Go to the <MB_HOME_3.0.0>/repository/conf/ directory and update the datasource references in the user-­mgt.xml and registry.xml files to match the updated configurations in the master­datasources.xml file. The following are sample configurations with the datasource set to “jdbc/WSO2CarbonDB”:

      registry.xml 

      Code Block
      <dbConfig name="wso2registry">
      <dataSource>jdbc/WSO2CarbonDB</dataSource>
      </dbConfig>

      user­mgt.xml

      Code Block
      <UserManager>
      <Realm>
      <Configuration>
      ...
      <Property
      name="dataSource">jdbc/WSO2CarbonDB</Property>
      </Configuration>
      ...
      </Realm>
      </UserManager>
  2. To connect MB 3.0.0 to the new database for MB-specific data, configure the following files:
    1. Configure the <MB_HOME_3.0.0>/repository/conf/datasources/master­datasources.xml file. This configuration should point to the MB-specific database that you set up in the previous section. See the following example:

      Code Block
      <datasource>
        <name>WSO2_MB_STORE_DB</name>
        <jndiConfig>
           <name>WSO2MBStoreDB</name>
        </jndiConfig>
           <definition type="RDBMS">
               <configuration>
                  <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                  <url>jdbc:mysql://localhost/wso2_mb</url>
                  <username>root</username>
                  <password>root</password>
                  <maxActive>50</maxActive>
                  <maxWait>60000</maxWait>
                  <minIdle>5</minIdle>
                  <testOnBorrow>true</testOnBorrow>
                  <validationQuery>SELECT 1</validationQuery>
                  <validationInterval>30000</validationInterval>
                  <defaultAutoCommit>false</defaultAutoCommit>
               </configuration>
            </definition>
      </datasource>
    2. Go to the broker.xml file (stored in the <MB_HOME_3.0.0>/repository/conf folder) and update the persistence information related to MB-specific data. See the following example:

      Code Block
      <messageStore class="org.wso2.andes.store.rdbms.RDBMSMessageStoreImpl">
          <property name="dataSource">WSO2MBStoreDB</property>
          <property name="storeUnavailableSQLStateClasses">08</property>
          <property name="integrityViolationSQLStateClasses">23,27,44</property>
          <property name="dataErrorSQLStateClasses">21,22</property>
          <property name="transactionRollbackSQLStateClasses">40</property>
      </messageStore>
      <contextStore class="org.wso2.andes.store.rdbms.RDBMSAndesContextStoreImpl">
          <property name="dataSource">WSO2MBStoreDB</property>
          <property name="storeUnavailableSQLStateClasses">08</property>
          <property name="integrityViolationSQLStateClasses">23,27,44</property>
          <property name="dataErrorSQLStateClasses">21,22</property>
          <property name="transactionRollbackSQLStateClasses">40</property>
      </contextStore>
  3. Check for any other configurations that were done for MB 2.2.0 (based on your solutions), and update the configuration files in MB 3.0.0 accordingly. For example, external user stores, caching, mounting, etc. 
    • The following configuration is introduced with the Carbon 4.4.2 version and is applicable to all WSO2 products that are based on Carbon 4.4.2:

      Configuration File 
      The user-mgt.xml file stored in the <PRODUCT_HOME>/repository/conf directory.

      The <isCascadeDeleteEnabled> property enables cascade delete for records entered in the UM_USER_PERMISSION and UM_ROLE_PERMISSION tables of the database used for storing user permissions.

    • The following configuration files are new in MB 3.0.0:
      • broker.xml file (stored in the <MB_HOME_3.0.0>/repository/conf folder)
      • metrics.xml file (stored in the <MB_HOME_3.0.0>/repository/conf folder)
      • metrics.properties file (stored in the <MB_HOME_3.0.0>/repository/conf folder)
      • metrics-datasources.xml file (stored in the <MB_HOME_3.0.0>/repository/conf/datasources folder)

Step 3: Start the new server and create new Topics and Queues

...