JBoss Fuse Fabric MQ error

Posted on

I need some help with an error setting up a a fabric mq.

I have the latest Fuse installed on 3 servers supporting a Fabric MQ.
I'm new to JBoss Fuse my goal is to setup a Fabric running 3 MQ containers and 3 Camel routes.

I have setup a Fabric that includes the 3 servers.
I'm getting the following error in the MQ container log:

Exception on start: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in URL [profile:broker.xml]: Could not resolve placeholder 'replicas' in string value "${replicas}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'replicas' in string value "${replicas}"

Below are my configs.

My org.fusesource.mq.fabric.server-esbbroker file contains the following config:

replicas = 3
standby.pool = default
connectors = openwire
broker-name = esbbroker_${karaf.name}
data = ${karaf.base}/data/esbbroker
replicating = true
config = profile:broker.xml
group = esbbrokergrp
kind = Replicated
network =
openwire-port = 61617

Broker.xml

xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">

<!-- Allows us to use system properties and fabric as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="properties">
        <bean class="org.fusesource.mq.fabric.ConfigurationProperties"/>
    </property>
</bean>

<broker xmlns="http://activemq.apache.org/schema/core" brokerName="${broker-name}" dataDirectory="${data}" start="false" restartAllowed="false">

    <destinationPolicy>
        <policyMap>
          <policyEntries>
            <policyEntry topic=">" producerFlowControl="true">
              <pendingMessageLimitStrategy>
                <constantPendingMessageLimitStrategy limit="1000"/>
              </pendingMessageLimitStrategy>
            </policyEntry>
            <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
            </policyEntry>
          </policyEntries>
        </policyMap>
    </destinationPolicy>

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

    <persistenceAdapter>
        <replicatedLevelDB directory="${data}/leveldb/${karaf.name}"
          replicas="${replicas}"
          zkAddress="${zookeeper.url}"
          zkPassword="${zookeeper.password}"
          zkPath="/fabric/registry/clusters/fusemq-replication-elections/${group}"
          securityToken="${zookeeper.password}"
          hostname="${container.ip}"
          container="${container.id}"
          />
    </persistenceAdapter>

    <plugins>
        <jaasAuthenticationPlugin configuration="karaf" />
    </plugins>

    <systemUsage>
        <systemUsage>
            <memoryUsage>
                <memoryUsage limit="64 mb"/>
            </memoryUsage>
            <storeUsage>
                <storeUsage limit="100 gb"/>
            </storeUsage>
            <tempUsage>
                <tempUsage limit="50 gb"/>
            </tempUsage>
        </systemUsage>
    </systemUsage>

    <transportConnectors>
        <transportConnector name="openwire" uri="tcp://0.0.0.0:0"/>
    </transportConnectors>
</broker>

Responses