When you start up the OSGi container for the first time, it automatically installs and activates a default broker instance. The default broker creates an Openwire port that listens on IP port 61616 and a Stomp port that listens on IP port 61613. The broker remains installed in the OSGi container and activates whenever you restart the OSGi container.
You can examine the broker configuration by looking at the contents of the file
,
which contains a copy of the default broker's configuration. It is
not possible to change the default broker's configuration
by editing this file, however. The active copy of the default broker configuration
is already deployed as a bundle in the OSGi container.InstallDir
/etc/activemq-broker.xml
The default broker is deployed as the bundle named,
activemq-broker.xml
. To discover the default broker's bundle ID,
enter the following console command:
osgi:list | grep activemq
You should see some output like the following:
[ 42] [Active ] [Created ] [ ] [ 60] activemq-core (5.4.0.fuse-00-00)
[ 44] [Active ] [ ] [ ] [ 60] activemq-console (5.4.0.fuse-00-00)
[ 45] [Active ] [ ] [ ] [ 60] activemq-ra (5.4.0.fuse-00-00)
[ 46] [Active ] [ ] [ ] [ 60] activemq-pool (5.4.0.fuse-00-00)
[ 47] [Active ] [Created ] [ ] [ 60] activemq-karaf (5.4.0.fuse-00-00)
[ 52] [Resolved ] [ ] [ ] [ 60] activemq-blueprint (5.4.0.fuse-00-00)
[ 53] [Active ] [Created ] [ ] [ 60] activemq-broker.xml (0.0.0)
In this example, the default broker has the bundle ID, 53
.
The default broker is configured to store its data in the following directory:
InstallDir
/data/activemq/default
If you decide that you don't want to use the default broker, you can disable it by
stopping its bundle. For example, assuming that the default broker has the bundle
ID, 53
, you can disable the default broker by entering the following
console command:
osgi:stop 53
The default broker will remain de-activated, even if you stop and restart the OSGi container.