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. First create a new database for user management and registry data in MB 3.0.0. See the section on on setting up the Carbon database for  for more information.
  2. Restore the old user management and registry data in the new database. 
  3. Create another new database for MB-specific data in MB 3.0.0. See the section on setting up the MB-specific database for more information.
  4. Restore the old MB-specific data in the new database.

You will now have two new databases for MB 3.0.0 with the old data that existed for MB 2.2.0.

Note

If there are multiple databases set up for MB 2.2.0, such as separate databases for multiple user stores etc., you need to create new databases for each of them.

...

  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 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

You now have your new MB 3.0.0 set up and configured. 

  1. Proceed to start the server.
  2. Log in to the Management Console of MB 3.0.0.Manually create all the users, roles and permissions. See the section on managing users, roles and permissions  for more information.
  3. Manually create all the Topics and Queues that were there in MB 2.2.0. See the sections on managing Queues and managing Topics for detailed instructions on how to add Topics and Queues.

...