jboss保险丝6.2.1 mq的面料

时间:2016-01-28 12:47:36

标签: linux jboss activemq jbossfuse fabric8

我在linux服务器上有一个带有两个子容器的结构模式的jboss fuse 6.2.1。我用这个命令创建了mq

fabric:mq-create --group mur --assign-container risng1,risng2 --port tcp=61617 mur-broker
MQ profile mq-broker-mur.mur-broker ready

但我希望传输协议将配置静态端口61617,但它是动态的。

在fuse 6.1中修改了基本模板broker.xml

 <transportConnector name="openwire" uri="tcp://0.0.0.0:${bindPort}"/>

绑定端口在配置文件中的属性中配置。在保险丝6.2中不起作用。我的问题是如何在jms代理上以结构模式配置静态端口?

我发现已关闭的问题https://issues.jboss.org/browse/FABRIC-1237

1 个答案:

答案 0 :(得分:1)

解决,

您可以在个人资料中使用自定义模板

  [12, 23, 43, 545, 43, 12]
  [-22, -4, -55, -999, -87]

和编辑属性

    <beans
  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="io.fabric8.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>
            <kahaDB directory="${data}/kahadb"/>
        </persistenceAdapter>

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

        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage percentOfJvmHeap="70"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="500 mb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="500 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>

        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://${bindAddress}:61617"/>
        </transportConnectors>
    </broker>

</beans>