Version 5.5
Copyright © 2012-2013 Red Hat, Inc. and/or its affiliates.
Updated: 27 Mar 2014
Table of Contents
List of Examples
This section summarizes the issues you need to consider when migrating from Fuse Message Broker 5.4 to Fuse Message Broker 5.5.
Fuse Message Broker 5.5 has the following notable product dependencies:
JDK 1.6.0_18 (or later) is now required.
Spring 3.0.x is now required (if using Spring).
Both Maven 2.2.1 and Maven 3.0 are now supported (for building the source).
Camel is upgraded to version 2.7.1.
When migrating to Fuse Message Broker 5.5, it is recommended that you follow these steps:
Update your environment variables to point at the new installation of Fuse Message Broker, as follows:
Update your environment variables as described in Setting up the Windows Environment in Managing and Monitoring a Broker.
Run the activemq setup administration tool to generate a new
startup script, as follows:
./activemq setup StartupScriptWhere StartupScript is the path to either of the
standard startup script locations, /etc/default/activemq and
/home/. 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.User/.activemqrc
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.
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).
Study the rest of this Migration Guide, to check whether there are any other issues that could affect your system.
From version Fuse Message Broker 5.4.0 onwards, the activemq script incorporates the functionality of the activemq-admin script.
The new activemq script adds the following commands:
start—starts the broker in background. It saves process id
in ${ACTIVEMQ_DATA_DIR}/activemq.pid for future reference.
console—starts the broker in foreground. It is the replacement for the old activemq script.
stop—stops the broker that is running in the background. It tries first to stop the broker using shutdown task. If that task doesn't return in 30 seconds, it kills the process.
restart—stops the running instance and starts a new one.
status—checks to see if a broker is running.
setup—create the specified configuration file for this
script. The configuration of the script can be placed at
/etc/default/activemq or $HOME/.activemqrc.
Since Fuse Message Broker 5.4.0, the KahaDB message store is the default persistence layer used by Fuse Message Broker. The KahaDB message store is the latest evolution of Fuse Message Broker's native message store and it supersedes both the AMQ message store and the (original) Kaha message store.
If no configuration is specified for the KahaDB message store, an instance with default settings is automatically created for you.
The KahaDB message store can be configured explicitly using the kahaDB
element inside the persistenceAdapter element, as follows:
<broker brokerName="broker" persistent="true" useShutdownHook="false"> ... <persistenceAdapter> <kahaDB directory="activemq-data"/> </persistenceAdapter> </broker>
For more details about the KahaDB message store, see Using the KahaDB Message Store in Configuring Broker Persistence.
In versions prior to 5.4.0, the element order inside the broker
element was unimportant, because the XML configuration file was not validated. In version
5.5, however, the configuration file is validated against the Fuse Message Broker XML schema as it
is loaded. This means that the element's inside the broker element
must follow the order defined in the XML schema.
The element order is always alphabetical. The XML schema is generated by the XBeans utility, so alphabetical ordering is guaranteed.
If you have some legacy configuration files that are not alphabetically ordered, you might
prefer to skip the schema validation step. You can disable schema validation by setting the
validate=false option on the xbean URL. For example, to launch a broker on a
UNIX O/S using the configuration file, conf/activemq.xml,
without performing schema validation, enter the following
command:
./bin/activemq xbean:conf/activemq.xml?validate=false
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:
The Fuse Message Broker Web console does not work when the log4j rootLogger level is
set to DEBUG (see MB-805).
A workaround is to leave the rootLogger level at INFO and
set the activemq logger level to DEBUG instead. For
example:
log4j.logger.org.apache.activemq=DEBUG