簡體   English   中英

織物上的jboss保險絲6.2.1 mq

[英]jboss fuse 6.2.1 mq in fabric

我在具有兩個子容器的結構模式下的Linux服務器上具有jboss保險絲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,但它是動態的。

在保險絲6.1中,我修改了基本模板broker.xml

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

綁定端口在配置文件的屬性中配置。 在保險絲6.2中不起作用。 我的問題是如何在JMS Broker上以結構模式配置靜態端口?

我發現已關閉的問題https://issues.jboss.org/browse/FABRIC-1237

解決了,

您可以在個人資料中使用自定義模板

    <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>

和編輯屬性

    group = mur
broker-name = mur-broker
connectors=openwire
kind = MasterSlave
data = ${runtime.data}mur-broker
config=profile\:broker-mur.xml
config.checksum=${checksum:profile\:broker-mur.xml}
standby.pool=default
bindAddress=0.0.0.0
bindPort=61617

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM