Fuse Message Broker

Migration Guide

Version 5.5

Febuary 2012
Trademark Disclaimer
Third Party Acknowledgements

Updated: 27 Mar 2014

Table of Contents

1. Summary of Fuse Message Broker 5.4 to Fuse Message Broker 5.5 Migration
2. Unix Shell Scripts
3. Persistence Layer
4. Configuration File
5. Known Issues

List of Examples

4.1. Fuse Message Broker Blueprint configuraiton

When migrating to Fuse Message Broker 5.5, it is recommended that you follow these steps:

  1. Update your environment variables to point at the new installation of Fuse Message Broker, as follows:

    Windows O/S

    Update your environment variables as described in Setting up the Windows Environment in Managing and Monitoring a Broker.

    *NIX O/S

    Run the activemq setup administration tool to generate a new startup script, as follows:

    ./activemq setup StartupScript

    Where StartupScript is the path to either of the standard startup script locations, /etc/default/activemq and /home/User/.activemqrc. After generating the startup script, edit and customize it as necessary. For more details, see Setting up the Unix/Linux/OS X Environment in Managing and Monitoring a Broker.

  2. You can re-use your existing Fuse Message Broker XML configuration files. If you are migrating from a Fuse Message Broker version 5.3 or earlier, however, you might need to change the order of elements appearing inside the broker element, which are now required to appear in alphabetical order (as defined in the XML schema). The alphabetical ordering requirement applies to elements at all nesting depths.

    For more details, see Configuration File.

  3. To migrate KahaDB data files from earlier Fuse Message Broker versions, please observe the following points:

    • Always make backup copies of your existing KahaDB data files, before upgrading the broker.

    • Upgrading from 5.4.x to 5.5.0—when you start the 5.5 broker instance for the first time, the KahaDB auto-upgrade feature automatically upgrades the KahaDB data files.

    • Upgrading from 5.3.x to 5.5.0—due to a recent change in the format of the KahaDB index file, db.data, the KahaDB auto-upgrade feature cannot upgrade 5.3 index files. To upgrade from 5.3, therefore, delete the index and redo files, db.data and db.redo, before starting the 5.5 broker. Now, when you start the 5.5 broker, it recreates the index file as it starts up (if your database is large, this could take a long time, for example 20 to 30 minutes).

  4. Study the rest of this Migration Guide, to check whether there are any other issues that could affect your system.

In Fuse Message Broker 5.5, when deploying into the OSGi container, you have the option of embedding the broker XML inside a Blueprint configuration file, instead of using a Spring configuration file. The Fuse Message Broker Blueprint schema belongs to the following namespace:

http://activemq.apache.org/schema/blueprint

Example 4.1 shows an example of a Fuse Message Broker Blueprint configuration.

Example 4.1. Fuse Message Broker Blueprint configuraiton

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
           xmlns:amq="http://activemq.apache.org/schema/core">

    <ext:property-placeholder />

    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${karaf.data}/activemq/localhost" useShutdownHook="false">

        <destinationPolicy>
            <policyMap>
              <policyEntries>
                <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
                  <pendingSubscriberPolicy>
                    <vmCursor />
                  </pendingSubscriberPolicy>
                </policyEntry>
                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
                </policyEntry>
              </policyEntries>
            </policyMap>
        </destinationPolicy> 

        <managementContext>
            <managementContext createConnector="false"/>
        </managementContext>

        <persistenceAdapter>
            <kahaDB directory="${karaf.data}/activemq/localhost/kahadb"/>
        </persistenceAdapter>

        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://localhost:61616"/>
            <transportConnector name="stomp" uri="stomp://localhost:61613"/>
        </transportConnectors>
    </broker>

    <bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="tcp://localhost:61616" />
    </bean>

    <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
        <property name="maxConnections" value="8" />
        <property name="connectionFactory" ref="activemqConnectionFactory" />
    </bean>

    <bean id="resourceManager" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource">
          <property name="transactionManager" ref="transactionManager" />
          <property name="connectionFactory" ref="activemqConnectionFactory" />
          <property name="resourceName" value="activemq.localhost" />
    </bean>

    <reference id="transactionManager" interface="javax.transaction.TransactionManager" />

    <service ref="pooledConnectionFactory" interface="javax.jms.ConnectionFactory">
        <service-properties>
            <entry key="name" value="localhost"/>
        </service-properties>
    </service>
</blueprint>

Fuse Message Broker 5.5.1-fuse-00-xx has the following known issues: